Function Reference

GUICtrlSetCursor

Sets 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 cursor for the control)

 

Return Value

Success: Returns 1.
Failure: Returns 0.

 

Remarks

Unlike GUISetCursor which changes the cursor for an entire window, this function sets the 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.

 

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