Function Reference


GUICtrlCreateMonthCal

Creates a month calendar control for the GUI.

GUICtrlCreateMonthCal ( "text", left, top [, width [, height [, style [, exStyle]]]] )

Parameters

text The preselected date (always as "yyyy/mm/dd").
left The left side of the control. If -1 is used then left will be computed according to GUICoordMode.
top The top of the control. If -1 is used then top will be computed according to GUICoordMode.
width [optional] The width of the control (default is the previously used width).
height [optional] The height of the control (default is the previously used height).
style [optional] Defines the style of the control. See GUI Control Styles Appendix.

default (-1) : none.
forced style : $WS_TABSTOP
exStyle [optional] Defines the extended style of the control. See Extended Style Table.
default (-1) : WS_EX_CLIENTEDGE

Return Value

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

Remarks

To obtain the value of the control see GUICtrlRead.

Default resizing is $GUI_DOCKSIZE.

Related

GUICoordMode (Option), GUIGetMsg, GUICtrlRead

Example


#include <GUIConstantsEx.au3>

Example()

Func Example()
    Local $Date, $msg
    GUICreate("Get date", 210, 190)

    $Date = GUICtrlCreateMonthCal("1953/03/25", 10, 10)
    GUISetState()

    ; Run the GUI until the dialog is closed or timeout

    Do
        $msg = GUIGetMsg()
        If $msg = $Date Then MsgBox(0, "debug", "calendar clicked")
    Until $msg = $GUI_EVENT_CLOSE

    MsgBox(0, $msg, GUICtrlRead($Date), 2)
EndFunc   ;==>Example