- does PostQuitMessage only send WM_QUIT to message queue?
- Posted by r.z. on December 27th, 2006
For test purposes do not currenty have any message loop. I destroy my window
using DestroyWindow() cause it does some cleanup, I do not process
WM_DESTROY and then just exit WinMain. I was wondering whether this is
enough, whether PostQuitMessage and WM_QUIT are doing something useful apart
from breaking from the message loop?
Is it correct to exit from windows programm without using them?
- Posted by sickfile on December 27th, 2006
r.z. wrote:
you'll maybe end up closeing your window and your app still working. if
you do return from WinMain everything should be ok.
- Posted by David Jones on December 27th, 2006
r.z. <gklkj@hjkjhk.pl> wrote...
PostQuitMessage is not the same as WM_QUIT. See:
http://blogs.msdn.com/oldnewthing/ar...04/489028.aspx
Aside from that, all it does is break the message loop AFAIK.
If you have a window, you need to have a message loop. Period. Any
other design is just asking for trouble.
Why would you create a window that couldn't process messages anyway?
Doesn't seem very useful, even for testing.
David
- Posted by r.z. on December 27th, 2006
thanks for the link. I was just porting an app from some window library and
it was structured in such a way that it could crash in window procedure if
some pre-setup was unsuccesfull.
"David Jones" <ncic@tadmas.com> wrote in message
news:MPG.1ffc92ae33c7e483989694@news.cox-internet.com...