# Function Reference

# GUICtrlCreateUpdown

Creates an UpDown control for the GUI.

GUICtrlCreateUpdown ( inputcontrolID [, style = -1] )

## Parameters

inputcontrolID | The controlID of the input control in which the updown control will be created, or -1 for the last created control.
style | [optional] Defines the style of the control. See GUI Control Styles Appendix. default (-1) : $GUI_SS_DEFAULT_UPDOWN. forced style : $UDS_SETBUDDYINT and $UDS_ALIGNRIGHT if no align defined.

## Return Value

Success: | the identifier (controlID) of the new control.
Failure: | 0.

## Remarks

To use the values specified above you must #include <UpDownConstants.au3> in your script.
Max and min value can be set with GUICtrlSetLimit().
By default Windows increases the value when clicking the upper arrow button.
Default height resizing is done according to the one of the related input control.

## Related

GUICtrlCreateInput, GUICtrlSetData, GUICtrlSetLimit

## Example

    #include <GUIConstantsEx.au3>
    #include <MsgBoxConstants.au3>
    #include <WindowsStylesConstants.au3>

    Example()

    Func Example()
        GUICreate("My GUI UpDown", -1, -1, -1, -1, $WS_SIZEBOX)

        Local $idInput = GUICtrlCreateInput("2", 10, 10, 50, 20)
        GUICtrlCreateUpdown($idInput)

        ; Attempt to resize input control
        GUICtrlSetPos($idInput, 10, 10, 100, 40)

        GUISetState(@SW_SHOW)

        Local $idMsg
        ; Loop until the user exits.
        While 1
            $idMsg = GUIGetMsg()

            Switch $idMsg
                Case $GUI_EVENT_CLOSE
                    ExitLoop
            EndSwitch
        WEnd

        MsgBox($MB_SYSTEMMODAL, "Updown", GUICtrlRead($idInput))
    EndFunc   ;==>Example