Re: Technical question about modal loops
From: Dean Roddey (droddey_at_charmedquark.com)
Date: 07/05/04
- Next message: Dean Roddey: "Re: Technical question about modal loops"
- Previous message: Orlando Gondar: "Re: Communication Between Programs"
- In reply to: John Carson: "Re: Technical question about modal loops"
- Next in thread: John Carson: "Re: Technical question about modal loops"
- Reply: John Carson: "Re: Technical question about modal loops"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 5 Jul 2004 10:27:00 -0700
Well, that doesn't seem right, but anyway, it's kind of irrelevant to the
issue at hand which is that, if it does really disable it, how does the
disabled window get any mouse events, because you can clearly see with Spy
that they are not arriving, and I can see in my modal loop that they don't
occur either. That's really the crux of the problem. They seem to be
providing some way for themselves to see input on that disabled window that
I don't know about.
In the meantime, I've pretty much found a solution that works ok for me. The
biggest problem I had was that, if I didn't disable the owner window, you
can still click on the task bar item and it would minimize the owner, but
leave up the owned. So, I just have my frame window class watch for size
events, and send a message to any of it's owned windows letting them know
it's minimizing or restoring, and the owned windows just go with it now. So
if you click the task bar, the owner any owned windows (and their owned
windows and so forth) just all minimize, and if you click it again, they all
restore. That's a reasonable compromize for me.
The owner isn't disabled, but since I control the message loop, I just
prevent them from seeing any user input, so I can catch their input and
blick the title bar and keep the owned window active.
And the owned windows, when activated, will bring their owner to the top of
the z-order (without activiation) so that they owned window always comes
forward with them.
Those things provide a quite reasonable implementation for me, which won't
ever do anything wierd to confuse my users. Though, I'd still like to know
what Windows is doing in order to be able to get that input on the disabled
owner so I could do that.
"John Carson" <donaldquixote@datafast.net.au> wrote in message
news:Ouivz5lYEHA.1652@TK2MSFTNGP09.phx.gbl...
> It disables its owner because, for the sake of the experiment, it calls
>
> HWND hwndOwner = GetWindow(hwnd, GW_OWNER);
> EnableWindow(hwndOwner, FALSE);
>
> in WM_CREATE. This, as I understand it, is more or less what a modal
dialog
> box does.
>
>
> --
> John Carson
> 1. To reply to email address, remove donald
> 2. Don't reply to email address (post here instead)
>
- Next message: Dean Roddey: "Re: Technical question about modal loops"
- Previous message: Orlando Gondar: "Re: Communication Between Programs"
- In reply to: John Carson: "Re: Technical question about modal loops"
- Next in thread: John Carson: "Re: Technical question about modal loops"
- Reply: John Carson: "Re: Technical question about modal loops"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|