AIT_PostMessage

Description

Posts a message to a message queue associated with the thread used to create a specified window. This API function returns the control without waiting for that thread to process the message.

Format

bool AIT_PostMessage  (
 integer nWndHandle,     // Window handle
 integer nMessage,       // Message
 integer nWParam,        // First parameter for a message
 integer nLParam         // Second parameter for a message
);

Parameters

nWndHandle (input)

Specify a window handle to which to post a message.

The following value has a special meaning.

ValueDescription
HWND_BROADCASTPosts a message to all the top-level windows in the system, including an invalid window not owned, an invisible window not owned, an overlapped window (hidden by another front window), and a pop-up window. Does not post a message to any child windows.

nMessage (input)

Specify a message you want to post.

nWParam (input)

Specify additional information particular to a message.

nLParam (input)

Specify additional information particular to a message.

Return values

The return value is true if the function was executed normally, and false if not. If the function has returned false, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:

Extended error numberError code
8ERROR_NOT_ENOUGH_MEMORY
14ERROR_OUTOFMEMORY
87ERROR_INVALID_PARAMETER