|
Posted by Norman Diamond on September 25, 2007, 8:48 pm
Please log in for more thread options
DialogBox is documented as disabling the parent window. Disabling is
documented as blocking keyboard and mouse input, but not blocking other
kinds of Windows Messages.
In my experience on Pocket PCs, disabling also disables WM_CLOSE. I don't
know how many other undocumented misbehaviours occur.
If you're using MFC then ignore all of the above. An MFC pseudo-modal
dialog box isn't modal.
> Hi,
>
> I'm a bit confused here.
>
> I have a dialog based, fullscreen app, with no message loop.
>
> Several threads are kicked off which poll the internet for data.
>
> Now I want them to continue polling and presenting the main dialog with
> the
> data to work on.
>
> This is working fine.
> I then decided I wanted to present a dialog for the user to complete -
> while
> the other stuff carries on.
>
> I *thought* DialogBox blocked other processing, so I created a modeless
> dialog to present to the user, with createdialog.
>
> If I look at the output window in the debugger I see debugging messages
> showing that the main dialog is still processing data whilst the modeless
> dialog is up. Great it worked and I was happy.
>
> I was experimenting with the default Messagebox (modal) in this dialog,
> which I also thought would block the main processing. Guess what, it
> didn't.
> The threads are still being instigated and the data processed by the main
> dialog. It's as if I kicked off another thread for the messagebox.
>
> I then decided to create the dialog with DialogBox instead of createdialog
> and guess what, that doesn't block either.
>
> I'm totally confused now.
>
> How come the main dialog is still receiving messages whilst this other
> dialog is being displayed via DialogBox?
>
> I thought the currently displayed dialog "blocked" the other dialogs
> processing loops.
>
> Clearly they don't.
>
> If I set a breakpoint in the debugger after the DialogBox statement it
> doesn't hit that untill the dialogbox is closed, yet the main dialog
> continues processing!!!
>
> How come?
>
> Would someone explain what the situation is re multiple full screen
> dialogs.
>
> Thanks.
>
>
>
>
>
>
>
>
>
>
>
>
|