>From what I can see, what happens is this: If there is already a
message for appshell in the queue when calling PostQuitMessage,
appshell will eat the WM_QUIT message. One possible workaround is to
also set a global quit flag when doing the PostQuitMessage and then
let your message loop break out if this is set. Something like:
while (!gQuit) {
WaitMessage();
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
if (msg.message == WM_QUIT) {
gQuit = true;
break;
}
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
}
and:
case WM_DESTROY:
PostQuitMessage(0);
gQuit = true;
break;
Hope this helps,
-Pelle
On Jul 23, 10:59 am, pjohnsen <[EMAIL PROTECTED]> wrote:
> I am occasionally seeing similar behavior, i.e. that an embedding app
> hangs during shutdown on win32, though I haven't quite figured out
> what is going on yet. I will try to look more into this.
>
> -Pelle
>
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding