EN
Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

DateTime_SetRange macro

Sets the minimum and maximum allowable system times for a date and time picker (DTP) control. You can use this macro or send the DTM_SETRANGE message explicitly.

Syntax


BOOL DateTime_SetRange(
  HWND hwndDT,
  DWORD flags,
  LPSYSTEMTIME lpSysTimeArray
);

Parameters

hwndDT

Type: HWND

A handle to a DTP control.

flags

Type: DWORD

A value that specifies which range values are valid. This value can be a combination of the following:

ValueMeaning
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.

 

lpSysTimeArray

Type: LPSYSTEMTIME

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 flags 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 DateTime_SetSystemtime message specifies a date and time that falls outside the range, it will fail.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commctrl.h

 

 

Aggiunte alla community

AGGIUNGI
Mostra:
© 2014 Microsoft