DTM_SETRANGE message
Sets the minimum and maximum allowable system times for a date and time picker (DTP) control. You can send this message explicitly or use the DateTime_SetRange macro.
Parameters
-
wParam
-
A value specifying which range values are valid. This parameter can be a combination of the following values:
Value Meaning - GDTR_MIN
The first element in the SYSTEMTIME structure array is valid and will be used to set the minimum allowable system time. - GDTR_MAX
The second element in the SYSTEMTIME structure array is valid and will be used to set the maximum allowable system time. -
lParam
-
A pointer to a two-element array of SYSTEMTIME structures. The first element of the SYSTEMTIME array contains the minimum allowable time. The second element of the SYSTEMTIME array contains the maximum allowable time. It is not necessary to fill an array element that is not specified in the wParam parameter.
Return value
Returns nonzero if successful, or zero otherwise.
Remarks
The date and time picker displays only dates/times that fall within the specified range, preventing the user from selecting a date and time that falls outside the range. If the DTM_SETSYSTEMTIME message specifies a date and time that falls outside the range, it will fail.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2003 [desktop apps only] |
Header |
|