GetMessagePos

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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


DWORD GetMessagePos(void);

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.

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.

Headerwinuser.h
Librarycoredll.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show: