Quantcast
Channel: CodeGuru Forums - C++ and WinAPI
Viewing all articles
Browse latest Browse all 583

[RESOLVED] PostQuitMessage: why the WM_DESTROY isn't called?

$
0
0
heres my message loop:
Code:

WPARAM MessageLoop()
{
    MSG msgEvents;
    while(GetMessage(&msgEvents,NULL,0,0))
    {

        if(!IsDialogMessage(ActivatedForm,&msgEvents))
        {
            TranslateMessage(&msgEvents);
            DispatchMessage(&msgEvents);
        }
    }
    return msgEvents.wParam;
}

heres my End() function:
Code:

void End()
{
    if(hhookCBTProc!=0)
        UnhookWindowsHookEx(hhookCBTProc);
    PostQuitMessage(0);
}

why, when i use the PostQuitMessage(), the WM_DESTROY isn't called?
what window message i can use after the PostQuitMessage()?

Viewing all articles
Browse latest Browse all 583

Trending Articles