This example cancels a shutdown request (WM_QUIT message) and specifies that the message queue will not accept any new WM_QUIT messages.
#define INCL_WINMESSAGEMGR /* Window Message Functions */ #include <os2.h> HAB hab, BOOL fSuccess; /* Success indicator */ HMQ hmq; /* Queue handle */ hmq = WinCreateMsgQueue(hab, 0); fSuccess = WinCancelShutdown(hmq, TRUE);