On a system shutdown, each message queue normally posts a WM_QUIT
message. An application can then handle this message in one of the three
ways:
- Destroy its message queue using WinDestroyMsgQueue
(hmq).
- Call WinCancelShutdown (hmq, TRUE) to prevent
the current thread's event queue from receiving the WM_QUIT
messages when the system is shut down. This does not stop other threads
from receiving this message.
- Call WinCancelShutdown (hmq, FALSE) to remove
all pending WM_QUIT messages from
the current thread's event queue but allow future WM_QUIT
messages to be posted.
Either way, the system can proceed to the next queue.
[Back]
[Next]