windows_programming_notes.nbk: Home | Index | Next Page: Processing Keyboard Input | Previous Page: Posting a Message


 PostQuitMessage

The PostQuitMessage function indicates to the system that a thread has made a request to terminate (quit). It is typically used in response to a WM_DESTROY message.

Syntax

    void PostQuitMessage(int nExitCode);

Parameters

Return Value

No return value.

Remarks

The PostQuitMessage function posts a WM_QUIT message to the thread's message queue and returns immediately; the function simply indicates to the system that the thread is requesting to quit at some time in the future.

When the thread retrieves the WM_QUIT message from its message queue, it should exit its message loop and return control to the system. The exit value returned to the system must be the wParam parameter of the WM_QUIT message.

Function Information


windows_programming_notes.nbk: Home | Index | Next Page: Processing Keyboard Input | Previous Page: Posting a Message


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time