RAD Studio VCL Reference
TCommonCalendar.MsgSetRange Method (Integer, PSystemTime, Integer)

Implements the MinDate and MaxDate properties.

function MsgSetRange(Flags: Integer; SysTime: TSystemTimeRangeArray): Boolean; virtual; abstract; overload;
function MsgSetRange(Flags: Integer; SysTime: PSystemTime; Unused: Integer = 0): Boolean; virtual; abstract; overload; deprecated;
virtual __fastcall Boolean MsgSetRange(int Flags, TSystemTimeRangeArray SysTime) = 0;
virtual __fastcall Boolean MsgSetRange(int Flags, PSystemTime SysTime, int Unused = 0) = 0;

MsgSetRange implements the MinDate and MaxDate properties by sending a message to the calendar window handle. MsgSetRange is an abstract method, and must be overridden in descendant objects to send the appropriate message. 

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 by the method. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!