Jump to content

WinSetPointerPos: Difference between revisions

From EDM2
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
== WinStartTimer ==
WinSetPointerPos sets the pointer position.
; WinSetPointerPos(desktopHndl, x, y) : Set the pointer position.


=== Parameters ===
==Syntax==
; desktopHndl - [[HWND]] - input : The desktop handle whether [[HWND_DESKTOP]] or another valid value.
WinSetPointerPos(desktopHndl, x, y)
; x - [[LONG]] - input : x-coordinate in pixels relative to the desktop's lower left corner in screen units.
; y - LONG - input : y-coordinate in pixels relative to the desktop's lower left corner in screen units.


=== Returns ===
==Parameters==
Returns [[BOOL]]:
;desktopHndl ([[HWND]]) - input : The desktop handle whether [[HWND_DESKTOP]] or another valid value.
;x ([[LONG]]) - input : x-coordinate in pixels relative to the desktop's lower left corner in screen units.
;y (LONG) - input : y-coordinate in pixels relative to the desktop's lower left corner in screen units.
 
==Returns==
Returns (BOOL):
*[[TRUE]] Successful
*[[TRUE]] Successful
*[[FALSE]] Unsuccessful
*[[FALSE]] Unsuccessful
Line 21: Line 23:
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
==Example Code==
  HWND desktopHndl;
  HWND desktopHndl;
  LONG x;
  LONG x;
Line 29: Line 31:
  rc = WinSetPointerPos(desktopHndl, x, y);
  rc = WinSetPointerPos(desktopHndl, x, y);


=== Related Functions ===
==Related Functions==
*WinCreatePointer
*WinCreatePointer
*WinCreatePointerIndirect
*WinCreatePointerIndirect
Line 40: Line 42:
*WinQuerySysPointer
*WinQuerySysPointer
*WinQuerySysPointerData
*WinQuerySysPointerData
*WinSetPointer
*WinSetSysPointerData
*WinSetSysPointerData
*[[WinShowPointer]]
*[[WinShowPointer]]


[[Category:Win]]
[[Category:Win]]

Latest revision as of 19:07, 14 May 2025

WinSetPointerPos sets the pointer position.

Syntax

WinSetPointerPos(desktopHndl, x, y)

Parameters

desktopHndl (HWND) - input
The desktop handle whether HWND_DESKTOP or another valid value.
x (LONG) - input
x-coordinate in pixels relative to the desktop's lower left corner in screen units.
y (LONG) - input
y-coordinate in pixels relative to the desktop's lower left corner in screen units.

Returns

Returns (BOOL):

WinGetLastError could return:

Define (C/C++)

INCL_WINPOINTERS or INCL_PM or INCL_WIN

Calling Convention

Cdecl32

Example Code

HWND desktopHndl;
LONG x;
LONG y;
BOOL rc;
...
rc = WinSetPointerPos(desktopHndl, x, y);

Related Functions

  • WinCreatePointer
  • WinCreatePointerIndirect
  • WinDestroyPointer
  • WinDrawPointer
  • WinLoadPointer
  • WinQueryPointer
  • WinQueryPointerInfo
  • WinQueryPointerPos
  • WinQuerySysPointer
  • WinQuerySysPointerData
  • WinSetSysPointerData
  • WinShowPointer