Creates a date picker control with dropdown calendar.
Takes x (Int), y (Int), width (Int), height (Int), and parentWin (Int).
Returns gizmo ID, or 0 if parent not found.
BGI GUI
Parameters & Returns
Parameters
xInt
yInt
widthInt
heightInt
parentWinInt
Returns
Int
Quick Summary
Creates a date picker control with dropdown calendar.
Takes x (Int), y (Int), width (Int), height (Int), and parentWin (Int).
Returns gizmo ID, or 0 if parent not found.
Technical Exegesis...
Creates a date picker control with dropdown calendar. Searches gizmoMap for parent window ID. Increments gizmoIDCount for unique ID. Uses GetActualParentHWND for scroll panel support. Creates DATETIMEPICK_CLASS control with WS_CHILD | WS_VISIBLE | WS_BORDER | DTS_SHORTDATEFORMAT style. Applies hFont with WM_SETFONT. Gets current date with GetLocalTime(&st), sets picker to current date with DateTime_SetSystemtime(GDT_VALID). Creates CGizmo with GIZMO_DATEPICKER type, adds to gizmoMap.
Creates a date picker control with dropdown calendar. Searches gizmoMap for parent window ID. Increments gizmoIDCount for unique ID. Uses GetActualParentHWND for scroll panel support. Creates DATETIMEPICK_CLASS control with WS_CHILD | WS_VISIBLE | WS_BORDER | DTS_SHORTDATEFORMAT style. Applies hFont with WM_SETFONT. Gets current date with GetLocalTime(&st), sets picker to current date with DateTime_SetSystemtime(GDT_VALID). Creates CGizmo with GIZMO_DATEPICKER type, adds to gizmoMap. Returns gizmo ID, or 0 if parent not found.
This function creates a Windows DateTimePicker control in date mode. DTS_SHORTDATEFORMAT displays date in short format (MM/dd/yyyy or locale-specific). Control shows text field with dropdown button - clicking button opens calendar popup. Initial value is current system date. User can type date or select from calendar. Fires BGI_EVENT_COMMAND_UPDATE with BGI_EVENT_ID_DATEPICKER when date changes. Use bgiGetDatePickerDay/Month/Year() to retrieve selected date components. Common pattern: create picker, handle update events, query date with getter functions.