Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WinQueryPointerPos (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINPOINTERS
BOOL WinQueryPointerPos(hwndDesktop, pptl)
HWND hwndDesktop; /* handle of desktop window */
PPOINTL pptl; /* address of structure for pointer position */
The WinQueryPointerPos function retrieves the mouse pointer position. The
position returned is the position of the pointer at the time
WinQueryPointerPos is called and is not synchronized with the WinGetMsg and
WinPeekMsg functions. Use the WinQueryMsgPos function to get the pointer
position of the last message obtained via WinGetMsg or WinPeekMsg.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hwndDesktop Identifies the desktop window. This parameter can be
HWND_DESKTOP or the desktop window handle.
pptl Points to a POINTL structure that receives the pointer position
in screen coordinates.
Return Value
The return value is TRUE if the function is successful or FALSE if an error
occurs.
Comments
The position retrieved is in screen coordinates, not window coordinates. You
can convert screen coordinates to window coordinates with the
WinMapWindowPoints function.
See Also
WinGetMsg, WinPeekMsg, WinQueryMsgPos, WinQueryPointerInfo, POINTL
♦