Re: Locked (modal?) "simulated" dialogs
Hi Michael & Irv,
[Michael]
That's what I thought, too. I've been attempting to get that approach for
the last week or so. The illusion isn't perfect. For example, if you attempt
to focus on a "unfocusable" window, the focus returns to the "modal"
window - but not before the title bar changes to the focus color - and I end
up with two windows with "active" title bars. So I'm not catching the event
at a high enough level yet.
[Irv]
I'm trying to avoid "real" dialogs, since Win32Lib supports (or will
support) all the stuff that you get with dialogs anyway. I was looking for a
flag or function call that would declare a "normal" window to be modal.
After all, you could do that sort of thing in VB, so I assumed that it was
something that Win32 supported automatically.
But that appears not to be the case - only dialogs are allowed to be modal.
So I'm trying to see if I can simulate modality by locking a "normal"
window. My approach thus far has been to prevent other windows controlled by
Win32 from gaining focus. But as I mentioned to Michael, when I catch an
OnFocus, I'm catching the event *after* the other window has already gained
focus. So I need to capture the event *before* the window can accept the
focus, and re-route it to the "modal" window.
I'm not sure what event that is, and where to catch it. But I'm fairly sure
that's how VB did the trick, since there are no "modal" flags that I can get
with a "normal" window. They make the window *look* modal - but you can
still set focus on other windows.
Of course, I could easily be going about this the wrong way. If anyone has a
suggestion, I'm open to it.
-- David "cooling his jets
" Cuny
|
Not Categorized, Please Help
|
|