Partager via


GetMessagePos

This function returns a long value that gives the cursor position in screen coordinates.

DWORD GetMessagePos(void);

Return Values

The return value specifies the x- and y-coordinates of the cursor position. The x-coordinate is the low order int and the y-coordinate is the high-order int.

Remarks

As noted above, the x-coordinate is in the low-order int of the return value; the y-coordinate is in the high-order int (both represent signed values because they can take negative values on systems with multiple monitors).

For platforms that use a stylus rather than a mouse, the cursor position is the position of the stylus on the touch screen when the last message retrieved by the GetMessage function occurred.

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

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Winuser.h.
Link Library: Coredll.lib.

See Also

Message Queue Functions | GetCursorPos | GetMessage

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.