My knowledge of Win32 is sound, I just drew a few initial wrong conlusions
because I do not have superior knowledge of the SDL source code. At this
point I’ll just shutup, its a dead thread. I was trying to imply something,
but its futile, if I’m to be misunderstood, it is apt that it is an
irrelavent point now that it has been fixed with the patch. No harm done,
sorry for being OT.
I think I’ll just communicate in patches for now on. That is more useful.
Matthew
MJ> Hi John, everything you say is accurate. If a dialog does receive a
WM_QUIT
MJ> message, it posts it to the main window, according to the Win32
MJ> documentation. It makes sense that the dialog message loop will exit,
but
MJ> why isn’t the main program exiting?
MJ> Maybe this phantom WM_QUIT, that is always in the loop as you say, so
they
MJ> simply filter it out in the main message loop? I have to look at the
SDL
MJ> code when I get home.
Dialogs dont generate WM_QUIT - nothing does. The only thing that
generates this is a call to PostQuitMessage(). This is typically in
the WM_CLOSE or WM_DESTROY message for the apps main window.
Matt, I think you got the wrong end of the stick there.
For entertainment, and before we get into trouble for being OT, attached
is a little app that shows what happens when a window is created and then
destroyed with no message-loop calls in between:
$ flushdemo.exe
CreateWindow():
hWnd=0x1A0450, uMsg=0x24, wParam=0x00, lParam=0x22F8C0
hWnd=0x1A0450, uMsg=0x81, wParam=0x00, lParam=0x22F8A4
hWnd=0x1A0450, uMsg=0x83, wParam=0x00, lParam=0x22F8E0
hWnd=0x1A0450, uMsg=0x01, wParam=0x00, lParam=0x22F884
DestroyWindow():
hWnd=0x1A0450, uMsg=0x02, wParam=0x00, lParam=0x00
hWnd=0x1A0450, uMsg=0x82, wParam=0x00, lParam=0x00
PeekMessage():
MSG: hWnd=0x00, uMsg=0x12, wParam=0x00, lParam=0x00
which is:
WM_GETMINMAXINFO, WM_NCCREATE, WM_NCCALCSIZE, WM_CREATE
then:
WM_DESTROY, WM_NCDESTROY
then:
WM_QUIT