# Function Reference

GUICtrlSetCursor

Sets the mouse cursor icon for a particular control.

GUICtrlSetCursor ( controlID, cursorID )

Parameters

controlID | The control identifier (controlID) as returned by a GUICtrlCreate... function.
cursorID | cursor ID as used by Windows SetCursor API (use -1 for the default mouse cursor for the control)

Return Value

Success: | Returns 1.
Failure: | Returns 0.

Remarks

Unlike GUISetCursor which changes the mouse cursor for an entire window, this function sets the mouse cursor that is used when the mouse is hovering over the specified control.
If the cursorID is invalid the standard arrow will be displayed.
For a list of valid cursor IDs see MouseGetCursor.
CursorId = 16 will hide the mouse cursor.

Related

GUISetCursor

Example

#include <GUIConstants.au3>
GUICreate("put cursor over label", 300, 100)
GUICtrlCreateLabel("label",125,40)
GUICtrlSetCursor(-1, 4)
GUISetState ()
While GUIGetMsg()<> $GUI_EVENT_CLOSE
WEnd
Exit