Partager via


GetMessagePos

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Syntax

DWORD GetMessagePos(void);

Return Value

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

Header winuser.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

Message Queue Functions
GetCursorPos
GetMessage