# 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, or -1 for the last created control.
cursorID | cursor ID as used by Windows SetCursor API (use -1 for the default mouse cursor for the control)

## Return Value

Success: | 1.
Failure: | 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 <GUIConstantsEx.au3>

    Example()

    Func Example()
        GUICreate("put cursor over label", 300, 100)
        GUICtrlCreateLabel("label", 125, 40)
        GUICtrlSetCursor(-1, 4)
        GUISetState(@SW_SHOW)

        ; Loop until the user exits.
        While 1
            Switch GUIGetMsg()
                Case $GUI_EVENT_CLOSE
                    ExitLoop

            EndSwitch
        WEnd
    EndFunc   ;==>Example