This example destroys, using WinDestroyMsgQueue, a message queue previously created by WinCreateMsgQueue.

#define INCL_WINMESSAGEMGR      /* Window Message Functions     */
#define INCL_WINWINDOWMGR       /* Window Manager Functions     */
#include <os2.h>

BOOL    fDestroyed;     /* success of destroy call              */
HAB     hab;            /* anchor-block handle                  */
HMQ     hmq;            /* message queue handle                 */

hab = WinInitialize(0);          /* initialize PM */

hmq = WinCreateMsgQueue(hab, 0); /* create default size queue */

/*
.
.  initialize windows, message loop
.
*/

fDestroyed = WinDestroyMsgQueue(hmq);


[Back] [Next]