Vcl.ComCtrls.TMonthCalendar.MsgSetRange

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function MsgSetRange(Flags: Integer; SysTime: TSystemTimeRangeArray): Boolean; override;
function MsgSetRange(Flags: Integer; SysTime: PSystemTime; Unused: Integer = 0): Boolean; override; deprecated;

C++

virtual bool __fastcall MsgSetRange(int Flags, const Winapi::Commctrl::TSystemTimeRangeArray &SysTime)/* overload */;
virtual bool __fastcall MsgSetRange _DEPRECATED_ATTRIBUTE0 (int Flags, Winapi::Windows::PSystemTime SysTime, int Unused = 0x0)/* overload */;

Properties

Type Visibility Source Unit Parent
function protected
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TMonthCalendar

Description

Selects a range of dates.

MsgSetCalColors is used to implement the range specified by the Date and MaxDate properties. This protected method sets the selected dates using the Windows API call MonthCal_SetRange function.

The Flags parameter indicates what type of information is included in the SysTime array. It includes the GDTR_MIN flag if a minimum date is supplied and GDTR_MAX if a maximum date is supplied.

The SysTime parameter is a two-element array containing the minimum date as the first element and the maximum date as the second element. These values can be obtained from the MinDate and MaxDate properties by calling DateTimeToSystemTime.

MsgSetRange returns true if the range is set successfully, false otherwise.

See Also