So I have 2 dialog boxes that use the same dialog processor. The problem is,when one closes,it closes the other too because of the PostQuitMessage().
What can I do to be able to close only one?
Jump to content
Posted 27 February 2014 - 01:14 PM
Good point, to destroy a modeless dialog call DestroyWindow (although you can hide them instead sometimes rather than keep creating and destroying them all the time).
Posted 28 February 2014 - 03:53 AM
PostQuitMessage causes a WM_QUIT to be posted to the message queue, GetMessage() returns false when it finds WM_QUIT so this usually breaks out of the message loop entirely in a normal Win32 application and exits WinMain. Not sure if you have an explicit message loop or not but this is the reason.