cSetCalDate

Set the date or date range of a Month Calendar control with this function.

Syntax:

cSetCalDate (window-handle, date-time, date-time)

Parameters:

(i) window-handle Windows handle to a Month Calendar common control.

(s) date-time Time in YYYY:MM:DD:HH:MM:SS format

(s) date-time Time in YYYY:MM:DD:HH:MM:SS format

Return:

(i) @TRUE, if new date-time set @FALSE, if new date-time was not set

 

Set the date or date range of a Month Calendar control with this function. Month Calendar controls may or may not allow a date range to be specified. If the control you are setting allows the selection of a range of dates, you must place a valid date in both the second and third parameters. You can select a single date in a range style control by placing the same date in both parameters. If the control accepts only single dates, not ranges, the function will simply ignore the content of the third parameter. The Month Calendar data control does not display the time of day, so the hour, minute and second can be omitted from the input parameters. The colon delimiters must be provided, however.

The class name for the Month Calendar control is "SysMonthCal32".

 

32-bit Extender

This function is designed for Windows 32-bit application controls. It cannot be used on Windows 64-bit controls.

64-bit Extender

This function is designed for Windows 64-bit application controls. It cannot be used on Windows on 32-bit controls.

 

Example:

AddExtender("wwctl44i.dll",0,"wwctl64i.dll")
; Get a handle
hwndex = DllHwnd("Microsoft Control Spy")
hwnd = cWndbyclass(hwndex,"CSPYContainer")
hwnd = cWndbyclass(hwnd,"SysMonthCal32")
startdate = "1997:12:31:::"
enddate = "1998:1:2:::"
If cSetCalDate(hwnd, startdate, enddate)
   Message("Set Calendar", "Start date = %startdate% Enddate = %enddate%")
Else
   Message("Set Calendar", "Failed")
EndIf
Exit

See Also:

cGetCalDate, cWndByClass, cWndInfo, DLLhwnd (WIL help).