◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous► ──────────────────────────────────────────────────────────────────────────── #define INCL_WINMESSAGEMGR BOOL WinDestroyMsgQueue(hmq) HMQ hmq; /* handle of the message queue */ The WinDestroyMsgQueue function destroys a message queue. Any thread or application that creates a message queue should call WinDestroyMsgQueue to destroy that message queue before terminating. Parameter Description ──────────────────────────────────────────────────────────────────────────── hmq Identifies the message queue to be destroyed. This handle must have been created by a previous call to the WinCreateMsgQueue function in the same thread that is calling the WinDestroyMsgQueue function. Return Value The return value is TRUE if the function is successful or FALSE if an error occurs. Example This example calls WinInitialize to initialize the thread for making Presentation Manager function calls, and calls WinCreateMsgQueue to create a message queue for the thread. Before the thread terminates, it calls WinDestroyMsgQueue to destroy the message queue. hab = WinInitialize(0); hmq = WinCreateMsgQueue(hab, DEFAULT_QUEUE_SIZE); . . /* initialization and message loop */ . WinDestroyMsgQueue(hmq); See Also WinCreateMsgQueue, WinInitialize ♦