GetMessagePos

Syntax

DWORD GetMessagePos( )

This function returns a long value that represents the cursor position (in screen coordinates) when the last message obtained by the GetMessage function occurred.

This function has no parameters.

Return Value

The return value specifies the x- and y-coordinates of the cursor position. The x-coordinate is in the low-order word, and the y-coordinate is in the high-order word. If the return value is assigned to a variable, the MAKEPOINT macro can be used to obtain a POINT structure from the return value; the LOWORD or HIWORD macro can be used to extract the x- or the y-coordinate.

Comments

To obtain the current position of the cursor instead of the position when the last message occurred, use the GetCursorPos function.