Ermittelt Datumsinformationen die das höchste Limit des Controls darstellen
#include <GuiMonthCal.au3>
_GUICtrlMonthCal_GetMonthRangeMax ( $hWnd [, $bPartial = False] )
$hWnd | Control-ID / Handle des Controls |
$bPartial | [optional] legt den Bereich des zu ermittelnden Limits fest: True - vorherige und folgende Monate werden eingeschlossen False - nur Monate die komplette dargestellt werden, werden eingeschlossen |
- - - - - - - - Erklärung der Controls - - - - - - - -
$tagSYSTEMTIME, _GUICtrlMonthCal_GetMonthRange, _GUICtrlMonthCal_GetMonthRangeMaxStr, _GUICtrlMonthCal_GetMonthRangeMin
#include <GuiConstantsEx.au3>
#include <GuiMonthCal.au3>
#include <WindowsConstants.au3>
Global $g_idMemo
Example()
Func Example()
Local $tMin, $tMax, $idMonthCal
; Erstellt eine GUI
GUICreate("Month Calendar: Ermittelt das größtmögliche Datum des festgelegten Bereichs", 600, 300)
$idMonthCal = GUICtrlCreateMonthCal("", 4, 4, -1, -1, BitOR($WS_BORDER, $MCS_MULTISELECT), 0x00000000)
; Erstellt ein Memo Control
$g_idMemo = GUICtrlCreateEdit("", 4, 168, 392, 128, 0)
GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New")
GUISetState(@SW_SHOW)
; Ermittelt den Monatsbereich
$tMin = _GUICtrlMonthCal_GetMonthRangeMin($idMonthCal)
$tMax = _GUICtrlMonthCal_GetMonthRangeMax($idMonthCal)
MemoWrite("Größtmögliche Datum: " & StringFormat("%02d/%02d/%04d", DllStructGetData($tMin, "Month"), _
DllStructGetData($tMin, "Day"), _
DllStructGetData($tMin, "Year")))
MemoWrite("Kleinstmöglichstes Datum: " & StringFormat("%02d/%02d/%04d", DllStructGetData($tMax, "Month"), _
DllStructGetData($tMax, "Day"), _
DllStructGetData($tMax, "Year")))
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example
; Schreibt eine Nachricht in das Memo
Func MemoWrite($sMessage)
GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1)
EndFunc ;==>MemoWrite