TimoSoft DateTimeControls  1.3.3.113
 All Classes Namespaces Functions Typedefs Enumerations Enumerator Properties Pages
ICalendar Interface Reference

The main interface More...

Inherits IDispatch.

Public Member Functions

HRESULT About (void)
 Displays the control's credits More...
 
HRESULT CountVisibleMonths ([in, defaultvalue(-1)] VARIANT_BOOL includePartialVisibleMonths,[in, out, defaultvalue(0)] DATE *firstVisibleDate,[in, out, defaultvalue(0)] DATE *lastVisibleDate,[out, retval] LONG *pVisibleMonths)
 Retrieves details about the currently visible range of dates More...
 
HRESULT GetMaxTodayWidth ([out, retval] OLE_XSIZE_PIXELS *pWidth)
 Retrieves the maximum width of the “Today” string More...
 
HRESULT GetMinimumSize ([in, out, defaultvalue(0)] OLE_XSIZE_PIXELS *Width,[in, out, defaultvalue(0)] OLE_YSIZE_PIXELS *Height)
 Retrieves the control's minimum size required to display a full month More...
 
HRESULT GetRectangle ([in] ControlPartConstants controlPart,[in, defaultvalue(0)] LONG columnIndex,[in, defaultvalue(0)] LONG rowIndex,[in, defaultvalue(0)] LONG calendarIndex,[in, out, defaultvalue(0)] OLE_XPOS_PIXELS *Left,[in, out, defaultvalue(0)] OLE_YPOS_PIXELS *Top,[in, out, defaultvalue(0)] OLE_XPOS_PIXELS *Right,[in, out, defaultvalue(0)] OLE_YPOS_PIXELS *Bottom)
 Retrieves the bounding rectangle of the specified control part More...
 
HRESULT GetSelection ([in, out, defaultvalue(0)] DATE *selectionStart,[in, out, defaultvalue(0)] DATE *selectionEnd)
 Retrieves the current selection's start and end date More...
 
HRESULT HitTest ([in] OLE_XPOS_PIXELS x,[in] OLE_YPOS_PIXELS y,[in, out, defaultvalue(0)] HitTestConstants *hitTestDetails,[in, out, defaultvalue(0)] LONG *indexOfHitCalendar,[in, out, defaultvalue(0)] LONG *indexOfHitColumn,[in, out, defaultvalue(0)] LONG *indexOfHitRow,[in, out, defaultvalue(0)] OLE_XPOS_PIXELS *cellRectangleLeft,[in, out, defaultvalue(0)] OLE_YPOS_PIXELS *cellRectangleTop,[in, out, defaultvalue(0)] OLE_XPOS_PIXELS *cellRectangleRight,[in, out, defaultvalue(0)] OLE_YPOS_PIXELS *cellRectangleBottom,[out, retval] DATE *pHitDate)
 Hit-tests the specified point More...
 
HRESULT LoadSettingsFromFile ([in] BSTR file,[out, retval] VARIANT_BOOL *pSucceeded)
 Loads the control's settings from the specified file More...
 
HRESULT MinimizeRectangle ([in, out] OLE_XPOS_PIXELS *Left,[in, out] OLE_YPOS_PIXELS *Top,[in, out] OLE_XPOS_PIXELS *Right,[in, out] OLE_YPOS_PIXELS *Bottom)
 Changes the specified rectangle to the smallest size that still fits the same number of calendars More...
 
HRESULT Refresh (void)
 Advises the control to redraw itself
 
HRESULT SaveSettingsToFile ([in] BSTR file,[out, retval] VARIANT_BOOL *pSucceeded)
 Saves the control's settings to the specified file More...
 
HRESULT SetBoldDates ([in] SAFEARRAY(VARIANT_BOOL)*states,[out, retval] VARIANT_BOOL *pSucceeded)
 Sets the dates that are displayed using a bold font More...
 
HRESULT SetSelection ([in] DATE selectionStart,[in] DATE selectionEnd)
 Sets the selection's start and end date More...
 

Properties

AppearanceConstants Appearance [get, set]
 Controls the style of the control's outer border More...
 
OLE_COLOR BackColor [get, set]
 Specifies the control's background color More...
 
BorderStyleConstants BorderStyle [get, set]
 Controls the style of the control's inner border More...
 
LONG CalendarCount [get]
 Retrieves the number of calendars currently displayed More...
 
VARIANT_BOOL CalendarGridCellSelected ([in] LONG columnIndex,[in] LONG rowIndex,[in, defaultvalue(0)] LONG calendarIndex) [get]
 Determines whether the specified calendar grid cell is selected More...
 
BSTR CalendarGridCellText ([in] LONG columnIndex,[in] LONG rowIndex,[in, defaultvalue(0)] LONG calendarIndex) [get]
 Retrieves the text of the specified calendar grid cell More...
 
DATE CaretDate [get, set]
 Specifies the currently selected date More...
 
BSTR CaretDateText ([in, defaultvalue(0)] LONG calendarIndex) [get]
 Retrieves the caret date's text More...
 
DisabledEventsConstants DisabledEvents [get, set]
 Controls which events are fired More...
 
VARIANT_BOOL DontRedraw [get, set]
 Controls redrawing of the control More...
 
LONG DragScrollTimeBase [get, set]
 Controls the speed of automatic scrolling during drag'n'drop More...
 
VARIANT_BOOL Enabled [get, set]
 Controls whether the control accepts user input More...
 
DATE FirstDate ([in, defaultvalue(-1)] LONG rowIndex,[in, defaultvalue(0)] LONG calendarIndex) [get]
 Retrieves the specified calendar's first date More...
 
IFontDisp Font [get, set]
 Specifies the control's font More...
 
OLE_COLOR ForeColor [get, set]
 Specifies the control's text color More...
 
BSTR HeaderText ([in, defaultvalue(0)] LONG calendarIndex) [get]
 Retrieves the text being displayed in the calendar header, for instance “January, 2009” More...
 
VARIANT_BOOL HighlightTodayDate [get, set]
 Specifies whether the “Today” date is highlighted More...
 
LONG HoverTime [get, set]
 Controls when the MouseHover event is fired More...
 
OLE_HANDLE hWnd [get]
 Retrieves the control's window handle More...
 
VARIANT_BOOL KeepSelectionOnNavigation [get, set]
 Specifies whether the control keeps the selection while the user navigates to the next or previous view More...
 
DATE LastDate ([in, defaultvalue(-1)] LONG rowIndex,[in, defaultvalue(0)] LONG calendarIndex) [get]
 Retrieves the specified calendar's last date More...
 
DATE MaxDate [get, set]
 Specifies the maximum allowable date More...
 
LONG MaxSelectedDates [get, set]
 Specifies the maximum number of dates that can be selected at the same time More...
 
DATE MinDate [get, set]
 Specifies the minimum allowable date More...
 
OLE_COLOR MonthBackColor [get, set]
 Specifies the month portion's background color More...
 
IPictureDisp MouseIcon [get, set]
 Controls the control's mouse cursor More...
 
MousePointerConstants MousePointer [get, set]
 Controls the control's mouse cursor More...
 
VARIANT_BOOL MultiSelect [get, set]
 Specifies whether multiple dates can be selected More...
 
LONG Padding [get, set]
 Specifies the size of the control's padding More...
 
VARIANT_BOOL ProcessContextMenuKeys [get, set]
 Specifies whether the ContextMenu event can be invoked using the keyboard More...
 
VARIANT_BOOL RegisterForOLEDragDrop [get, set]
 Controls the control's behavior in drag'n'drop operations More...
 
RightToLeftConstants RightToLeft [get, set]
 Controls the control's right-to-left features More...
 
LONG ScrollRate [get, set]
 Specifies the number of months that the control moves its display if one of the scroll buttons is clicked More...
 
VARIANT_BOOL ShowTodayDate [get, set]
 Specifies whether the “Today” date is displayed at the bottom of the control More...
 
VARIANT_BOOL ShowTrailingDates [get, set]
 Specifies whether dates from the previous or next month are displayed More...
 
VARIANT_BOOL ShowWeekNumbers [get, set]
 Specifies whether week numbers are displayed to the left of each row of days More...
 
StartOfWeekConstants StartOfWeek [get, set]
 Specifies which day is handled as the first day of a week More...
 
VARIANT_BOOL SupportOLEDragImages [get, set]
 Controls the control's behavior in drag'n'drop operations More...
 
OLE_COLOR TitleBackColor [get, set]
 Specifies the title portion's background color More...
 
OLE_COLOR TitleForeColor [get, set]
 Specifies the title portion's text color More...
 
DATE TodayDate [get, set]
 Specifies the date that is displayed as the “Today” date More...
 
OLE_COLOR TrailingForeColor [get, set]
 Specifies the text color of trailing dates More...
 
VARIANT_BOOL UsePadding [get, set]
 Controls the control's padding More...
 
VARIANT_BOOL UseShortestDayNames [get, set]
 Specifies whether the control uses the shortest instead of the short day names More...
 
VARIANT_BOOL UseSystemFont [get, set]
 Specifies whether the control uses the system font More...
 
BSTR Version [get]
 Retrieves the control's version More...
 
ViewConstants View [get, set]
 Specifies the control's view mode More...
 
VARIANT_BOOL DetectDoubleClicks [get, set]
 Specifies whether the control intercepts double clicks More...
 

Detailed Description

The main interface

Author
Timo "TimoSoft" Kunze This is the calendar control's main interface. It wraps the control window.
See Also
_ICalendarEvents

Member Function Documentation

HRESULT About ( void  )

Displays the control's credits

Displays some information about this control and its author.

HRESULT CountVisibleMonths ( [in, defaultvalue(-1)] VARIANT_BOOL  includePartialVisibleMonths,
[in, out, defaultvalue(0)] DATE *  firstVisibleDate,
[in, out, defaultvalue(0)] DATE *  lastVisibleDate,
[out, retval] LONG *  pVisibleMonths 
)

Retrieves details about the currently visible range of dates

Retrieves details about the currently visible range of dates. These details include the first and the last visible date and the number of visible months.

Parameters
[in]includePartialVisibleMonthsIf set to True, trailing dates are included; otherwise only entirely displayed months are counted.
[out]firstVisibleDateThe first visible date.
[out]lastVisibleDateThe last visible date.
Returns
The number of months currently visible.
See Also
CaretDate
HRESULT GetMaxTodayWidth ( [out, retval] OLE_XSIZE_PIXELS *  pWidth)

Retrieves the maximum width of the “Today” string

Retrieves the maximum width of the “Today” string.

Returns
The maximum width of the “Today” string.
See Also
ShowTodayDate, TodayDate
HRESULT GetMinimumSize ( [in, out, defaultvalue(0)] OLE_XSIZE_PIXELS *  Width,
[in, out, defaultvalue(0)] OLE_YSIZE_PIXELS *  Height 
)

Retrieves the control's minimum size required to display a full month

Retrieves the control's minimum size required to display a full month.

Parameters
[out]widthThe minimum width.
[out]heightThe minimum height.
See Also
MinimizeRectangle
HRESULT GetRectangle ( [in] ControlPartConstants  controlPart,
[in, defaultvalue(0)] LONG  columnIndex,
[in, defaultvalue(0)] LONG  rowIndex,
[in, defaultvalue(0)] LONG  calendarIndex,
[in, out, defaultvalue(0)] OLE_XPOS_PIXELS *  Left,
[in, out, defaultvalue(0)] OLE_YPOS_PIXELS *  Top,
[in, out, defaultvalue(0)] OLE_XPOS_PIXELS *  Right,
[in, out, defaultvalue(0)] OLE_YPOS_PIXELS *  Bottom 
)

Retrieves the bounding rectangle of the specified control part

Retrieves the bounding rectangle (in pixels relative to the control's upper-left corner) of the specified control part.

Parameters
[in]controlPartThe part of the control for which to retrieve the rectangle. Any of the values defined by the ControlPartConstants enumeration is valid.
[in]columnIndexThe column index of the grid cell for which to retrieve the rectangle. The index starts at -1, which identifies the week numbers column. This parameter is ignored if controlPart is not equal to cpCalendarCell.
[in]rowIndexThe row index of the grid cell or row for which to retrieve the rectangle. The index starts at -1, which identifies the week days row. This parameter is ignored if controlPart is not equal to cpCalendarRow or cpCalendarCell.
[in]calendarIndexThe zero-based index of the calendar for which to retrieve the rectangle. The control can display up to 12 calendars at once. This parameter is ignored if controlPart is equal to cpControl, cpNextButton, cpPreviousButton or cpFooter.
[out]leftThe x-coordinate (in pixels) of the upper-left corner of the control part's bounding rectangle relative to the control's upper-left corner.
[out]topThe y-coordinate (in pixels) of the upper-left corner of the control part's bounding rectangle relative to the control's upper-left corner.
[out]rightThe x-coordinate (in pixels) of the lower-right corner of the control part's bounding rectangle relative to the control's upper-left corner.
[out]bottomThe y-coordinate (in pixels) of the lower-right corner of the control part's bounding rectangle relative to the control's upper-left corner.
Remarks
Requires comctl32.dll version 6.10 or higher.
See Also
ControlPartConstants
HRESULT GetSelection ( [in, out, defaultvalue(0)] DATE *  selectionStart,
[in, out, defaultvalue(0)] DATE *  selectionEnd 
)

Retrieves the current selection's start and end date

Retrieves the first and the last date of the currently selected range of dates.

Parameters
[out]selectionStartThe first selected date.
[out]selectionEndThe last selected date.
Remarks
This method fails if the MultiSelect property is set to False.
See Also
SetSelection, CalendarGridCellSelected, MultiSelect, KeepSelectionOnNavigation, _ICalendarEvents::SelectionChanged
HRESULT HitTest ( [in] OLE_XPOS_PIXELS  x,
[in] OLE_YPOS_PIXELS  y,
[in, out, defaultvalue(0)] HitTestConstants hitTestDetails,
[in, out, defaultvalue(0)] LONG *  indexOfHitCalendar,
[in, out, defaultvalue(0)] LONG *  indexOfHitColumn,
[in, out, defaultvalue(0)] LONG *  indexOfHitRow,
[in, out, defaultvalue(0)] OLE_XPOS_PIXELS *  cellRectangleLeft,
[in, out, defaultvalue(0)] OLE_YPOS_PIXELS *  cellRectangleTop,
[in, out, defaultvalue(0)] OLE_XPOS_PIXELS *  cellRectangleRight,
[in, out, defaultvalue(0)] OLE_YPOS_PIXELS *  cellRectangleBottom,
[out, retval] DATE *  pHitDate 
)

Hit-tests the specified point

Retrieves the control's parts that lie below the point ('x'; 'y').

Parameters
[in]xThe x-coordinate (in pixels) of the point to check. It must be relative to the control's upper-left corner.
[in]yThe y-coordinate (in pixels) of the point to check. It must be relative to the control's upper-left corner.
[out]hitTestDetailsReceives a value specifying the exact part of the control the specified point lies in. Any of the values defined by the HitTestConstants enumeration is valid.
[out]indexOfHitCalendarComctl32.dll version 6.10 and newer only: Receives the zero-based index of the calendar that contains the specified point (in case that multiple calendars are displayed).
[out]indexOfHitColumnComctl32.dll version 6.10 and newer only: Receives the zero-based index of the column in the calendar grid that the specified point is over.
[out]indexOfHitRowComctl32.dll version 6.10 and newer only: Receives the zero-based index of the row in the calendar grid that the specified point is over.
[out]cellRectangleLeftComctl32.dll version 6.10 and newer only: Receives the distance (in pixels) between the control's left border and the left border of the calendar grid cell that the specified point is over.
[out]cellRectangleTopComctl32.dll version 6.10 and newer only: Receives the distance (in pixels) between the control's upper border and the upper border of the calendar grid cell that the specified point is over.
[out]cellRectangleRightComctl32.dll version 6.10 and newer only: Receives the distance (in pixels) between the control's left border and the right border of the calendar grid cell that the specified point is over.
[out]cellRectangleBottomComctl32.dll version 6.10 and newer only: Receives the distance (in pixels) between the control's upper border and the lower border of the calendar grid cell that the specified point is over.
Returns
The date that the specified point is over. Zero, if no date was hit.
See Also
HitTestConstants
HRESULT LoadSettingsFromFile ( [in] BSTR  file,
[out, retval] VARIANT_BOOL *  pSucceeded 
)

Loads the control's settings from the specified file

Parameters
[in]fileThe file to read from.
Returns
True if the settings could be loaded; otherwise False.
See Also
SaveSettingsToFile
HRESULT MinimizeRectangle ( [in, out] OLE_XPOS_PIXELS *  Left,
[in, out] OLE_YPOS_PIXELS *  Top,
[in, out] OLE_XPOS_PIXELS *  Right,
[in, out] OLE_YPOS_PIXELS *  Bottom 
)

Changes the specified rectangle to the smallest size that still fits the same number of calendars

Calculates how many calendars will fit in the specified rectangle, and then sets the rectangle to the minimum size that it needs to be to fit that number of calendars.

Parameters
[in,out]leftOn entry, specifies the x-coordinate (in pixels) of the left border of the rectangle to minimize. On return, it receives the x-coordinate of the left border of the minimized rectangle.
[in,out]topOn entry, specifies the y-coordinate (in pixels) of the top border of the rectangle to minimize. On return, it receives the y-coordinate of the top border of the minimized rectangle.
[in,out]rightOn entry, specifies the x-coordinate (in pixels) of the right border of the rectangle to minimize. On return, it receives the x-coordinate of the right border of the minimized rectangle.
[in,out]bottomOn entry, specifies the y-coordinate (in pixels) of the bottom border of the rectangle to minimize. On return, it receives the y-coordinate of the bottom border of the minimized rectangle.
Remarks
Requires comctl32.dll version 6.10 or higher.
See Also
GetMinimumSize, CalendarCount
HRESULT SaveSettingsToFile ( [in] BSTR  file,
[out, retval] VARIANT_BOOL *  pSucceeded 
)

Saves the control's settings to the specified file

Parameters
[in]fileThe file to write to.
Returns
True if the settings could be saved; otherwise False.
See Also
LoadSettingsFromFile
HRESULT SetBoldDates ( [in] SAFEARRAY(VARIANT_BOOL)*  states,
[out, retval] VARIANT_BOOL *  pSucceeded 
)

Sets the dates that are displayed using a bold font

Sets the dates that are displayed using a bold font.

Parameters
[in]statesAn array containing the state for each currently displayed date. If a date's entry is set to True, it is displayed bold; otherwise not.
Note: To simplify handling, it is assumed that each month has 31 days. So if the state for April 30th is stored at index 30, the state for May 1st would be stored at index 32 instead of 31.
This array must contain at least n * 31 elements where n is the number of months returned by CountVisibleMonths(True).
Returns
True on success; otherwise False.
Remarks
Due to a bug in Windows, bold dates won't show up bold if using comctl32.dll version 6.10 on Windows Vista.
If the control's view changes or it is closed, any previously set bold states are lost.
See Also
CountVisibleMonths, _ICalendarEvents::GetBoldDates
HRESULT SetSelection ( [in] DATE  selectionStart,
[in] DATE  selectionEnd 
)

Sets the selection's start and end date

Sets the first and the last date of the selected range of dates.

Parameters
[in]selectionStartThe first date to select.
[in]selectionEndThe last date to select.
Remarks
This method fails if the MultiSelect property is set to False.
See Also
GetSelection, CalendarGridCellSelected, MultiSelect, KeepSelectionOnNavigation, _ICalendarEvents::SelectionChanged

Property Documentation

AppearanceConstants Appearance
getset

Controls the style of the control's outer border

Retrieves or sets the kind of border that is drawn around the control. Any of the values defined by the AppearanceConstants enumeration except aDefault is valid.

See Also
BorderStyle, Padding, AppearanceConstants
OLE_COLOR BackColor
getset

Specifies the control's background color

Retrieves or sets the control's background color.

See Also
ForeColor, TitleBackColor, TitleForeColor, MonthBackColor, TrailingForeColor
BorderStyleConstants BorderStyle
getset

Controls the style of the control's inner border

Retrieves or sets the kind of inner border that is drawn around the control. Any of the values defined by the BorderStyleConstants enumeration is valid.

See Also
Appearance, Padding, BorderStyleConstants
LONG CalendarCount
get

Retrieves the number of calendars currently displayed

Retrieves the number of calendars currently displayed.

Remarks
Requires comctl32.dll version 6.10 or higher.
This property is read-only.
See Also
MinimizeRectangle
VARIANT_BOOL CalendarGridCellSelected([in] LONG columnIndex, [in] LONG rowIndex, [in, defaultvalue(0)] LONG calendarIndex)
get

Determines whether the specified calendar grid cell is selected

Retrieves whether the specified calendar grid cell is selected. If set to True, the cell is selected; otherwise not.

Parameters
[in]columnIndexThe column index of the grid cell for which to retrieve the selection state. The index starts at -1, which identifies the week numbers column.
[in]rowIndexThe row index of the grid cell for which to retrieve the selection state. The index starts at -1, which identifies the week days row.
[in]calendarIndexThe zero-based index of the calendar for which to retrieve the selection state. The control can display up to 12 calendars at once.
Remarks
Requires comctl32.dll version 6.10 or higher.
This property is read-only.
See Also
CaretDate, MultiSelect, GetSelection, SetSelection, CalendarGridCellText
BSTR CalendarGridCellText([in] LONG columnIndex, [in] LONG rowIndex, [in, defaultvalue(0)] LONG calendarIndex)
get

Retrieves the text of the specified calendar grid cell

Retrieves the text being displayed in the specified calendar grid cell. The string contains the Unicode character 8206 before each part of the text, e. g. “?January, ?2009” (? stands for character 8206). This marker can be used to extract specific parts from the text.

Parameters
[in]columnIndexThe column index of the grid cell for which to retrieve the text. The index starts at -1, which identifies the week numbers column.
[in]rowIndexThe row index of the grid cell for which to retrieve the text. The index starts at -1, which identifies the week days row.
[in]calendarIndexThe zero-based index of the calendar for which to retrieve the text. The control can display up to 12 calendars at once.
Remarks
Requires comctl32.dll version 6.10 or higher.
This property is read-only.
See Also
HeaderText, CaretDateText, CalendarGridCellSelected
DATE CaretDate
getset

Specifies the currently selected date

Retrieves or sets the currently selected date.

Remarks
This is the control's default property.
See Also
MultiSelect, MinDate, MaxDate, CaretDateText, _ICalendarEvents::SelectionChanged
BSTR CaretDateText([in, defaultvalue(0)] LONG calendarIndex)
get

Retrieves the caret date's text

Retrieves the text representing the caret date. The string contains the Unicode character 8206 before each part of the text, e. g. “?January, ?2009” (? stands for character 8206). This marker can be used to extract specific parts from the text.

Parameters
[in]calendarIndexThe zero-based index of the calendar for which to retrieve the text. The control can display up to 12 calendars at once.
Remarks
Requires comctl32.dll version 6.10 or higher.
This property is read-only.
See Also
CaretDate, CalendarGridCellText, HeaderText
DisabledEventsConstants DisabledEvents
getset

Controls which events are fired

Retrieves or sets the events that won't be fired. Disabling events increases performance. Any combination of the values defined by the DisabledEventsConstants enumeration is valid.

See Also
DisabledEventsConstants
VARIANT_BOOL DontRedraw
getset

Controls redrawing of the control

Enables or disables automatic redrawing of the control. Disabling redraw while doing large changes on the control may increase performance. If set to False, the control will redraw itself automatically; otherwise not.

LONG DragScrollTimeBase
getset

Controls the speed of automatic scrolling during drag'n'drop

Retrieves or sets the period of time (in milliseconds) that is used as the time-base to calculate the velocity of auto-scrolling during a drag'n'drop operation. If set to 0, auto-scrolling is disabled. If set to -1, the system's double-click time is used.

See Also
RegisterForOLEDragDrop, _ICalendarEvents::OLEDragMouseMove
VARIANT_BOOL Enabled
getset

Controls whether the control accepts user input

Enables or disables the control for user input. If set to True, it reacts to user input; otherwise not.

DATE FirstDate([in, defaultvalue(-1)] LONG rowIndex, [in, defaultvalue(0)] LONG calendarIndex)
get

Retrieves the specified calendar's first date

Retrieves the specified calendar's first date that belongs to the month it is displaying.

Parameters
[in]rowIndexThe zero-based row index for which to retrieve the date. If set to -1, the first date of the whole calendar is retrieved.
[in]calendarIndexThe zero-based index of the calendar for which to retrieve the date. The control can display up to 12 calendars at once.
Remarks
Requires comctl32.dll version 6.10 or higher.
This property is read-only.
See Also
LastDate, MinDate
IFontDisp Font
getset

Specifies the control's font

Retrieves or sets the control's font. It's used to draw the control's content.

Remarks
Starting with comctl32.dll version 6.10, this property isn't supported for themed calendar controls.
See Also
UseSystemFont
OLE_COLOR ForeColor
getset

Specifies the control's text color

Retrieves or sets the control's text color.

Remarks
Starting with comctl32.dll version 6.10, this property isn't supported for themed calendar controls.
See Also
BackColor, TitleBackColor, TitleForeColor, MonthBackColor, TrailingForeColor
BSTR HeaderText([in, defaultvalue(0)] LONG calendarIndex)
get

Retrieves the text being displayed in the calendar header, for instance “January, 2009”

Retrieves the text being displayed in the calendar header, for instance “January, 2009”. The string contains the Unicode character 8206 before each part of the text, e. g. “?January, ?2009” (? stands for character 8206). This marker can be used to extract specific parts from the text.

Parameters
[in]calendarIndexThe zero-based index of the calendar for which to retrieve the text. The control can display up to 12 calendars at once.
Remarks
Requires comctl32.dll version 6.10 or higher.
This property is read-only.
See Also
CalendarGridCellText, CaretDateText
VARIANT_BOOL HighlightTodayDate
getset

Specifies whether the “Today” date is highlighted

Retrieves or sets whether the “Today” date is highlighted, e. g. by drawing a circle around it. If set to True, it is highlighted; otherwise not.

See Also
ShowTodayDate
LONG HoverTime
getset

Controls when the MouseHover event is fired

Retrieves or sets the number of milliseconds the mouse cursor must be located over the control's client area before the MouseHover event is fired. If set to -1, the system hover time is used.

See Also
_ICalendarEvents::MouseHover
OLE_HANDLE hWnd
get

Retrieves the control's window handle

Retrieves the control's window handle.

Remarks
This property is read-only.
See Also
_ICalendarEvents::RecreatedControlWindow, _ICalendarEvents::DestroyedControlWindow
VARIANT_BOOL KeepSelectionOnNavigation
getset

Specifies whether the control keeps the selection while the user navigates to the next or previous view

Retrieves or sets whether selected dates remain selected while the user scrolls to the next or previous view. If set to True, the selection is kept on navigation; otherwise not.

Remarks
Requires comctl32.dll version 6.10 or higher.
See Also
MaxSelectedDates, MultiSelect, ScrollRate, GetSelection, SetSelection
DATE LastDate([in, defaultvalue(-1)] LONG rowIndex, [in, defaultvalue(0)] LONG calendarIndex)
get

Retrieves the specified calendar's last date

Retrieves the specified calendar's last date that belongs to the month it is displaying.

Parameters
[in]rowIndexThe zero-based row index for which to retrieve the date. If set to -1, the last date of the whole calendar is retrieved.
[in]calendarIndexThe zero-based index of the calendar for which to retrieve the date. The control can display up to 12 calendars at once.
Remarks
Requires comctl32.dll version 6.10 or higher.
This property is read-only.
See Also
FirstDate, MaxDate
DATE MaxDate
getset

Specifies the maximum allowable date

Retrieves or sets the maximum date accepted by the control.

See Also
MinDate, LastDate, CaretDate
LONG MaxSelectedDates
getset

Specifies the maximum number of dates that can be selected at the same time

Retrieves or sets the maximum number of dates that can be selected at the same time.

Remarks
This property is ignored if the MultiSelect property is set to False.
See Also
MultiSelect, GetSelection, SetSelection, KeepSelectionOnNavigation
DATE MinDate
getset

Specifies the minimum allowable date

Retrieves or sets the minimum date accepted by the control.

See Also
MaxDate, FirstDate, CaretDate
OLE_COLOR MonthBackColor
getset

Specifies the month portion's background color

Retrieves or sets the background color of the month portion of the control.

Remarks
Starting with comctl32.dll version 6.10, this property isn't supported for themed calendar controls.
See Also
BackColor, ForeColor, TitleBackColor, TitleForeColor, TrailingForeColor
IPictureDisp MouseIcon
getset

Controls the control's mouse cursor

Retrieves or sets a user-defined mouse cursor. It's used if MousePointer is set to mpCustom.

See Also
MousePointer, MousePointerConstants
MousePointerConstants MousePointer
getset

Controls the control's mouse cursor

Retrieves or sets the cursor's type that's used if the mouse cursor is placed within the control's client area. Any of the values defined by the MousePointerConstants enumeration is valid.

See Also
MouseIcon, MousePointerConstants
VARIANT_BOOL MultiSelect
getset

Specifies whether multiple dates can be selected

Retrieves or sets whether multiple dates can be selected at the same time. If set to True, the user may select multiple dates; otherwise not.

Attention
Changing this property will destroy and recreate the control window.
See Also
MaxSelectedDates, GetSelection, SetSelection, KeepSelectionOnNavigation
LONG Padding
getset

Specifies the size of the control's padding

Retrieves or sets the distance (in pixels) between the control's content and the frame that the active theme might draw around the control.

Remarks
Requires comctl32.dll version 6.10 or higher.
See Also
UsePadding, Appearance, BorderStyle
VARIANT_BOOL ProcessContextMenuKeys
getset

Specifies whether the ContextMenu event can be invoked using the keyboard

Retrieves or sets whether the control fires the ContextMenu event if the user presses [SHIFT]+[F10] or [WINDOWS CONTEXTMENU]. If set to True, the events get fired; otherwise not.

See Also
_ICalendarEvents::ContextMenu
VARIANT_BOOL RegisterForOLEDragDrop
getset

Controls the control's behavior in drag'n'drop operations

Retrieves or sets whether the control is registered as a target for OLE drag'n'drop. If set to True, the control accepts OLE drag'n'drop actions; otherwise not.

See Also
SupportOLEDragImages, _ICalendarEvents::OLEDragEnter
RightToLeftConstants RightToLeft
getset

Controls the control's right-to-left features

Enables or disables bidirectional features. Any combination of the values defined by the RightToLeftConstants enumeration is valid.

See Also
RightToLeftConstants
LONG ScrollRate
getset

Specifies the number of months that the control moves its display if one of the scroll buttons is clicked

Retrieves or sets the scroll rate of the control. The scroll rate is the number of months that the control moves its display when the user clicks a scroll button.
If set to zero, the control scrolls by the number of months it is displaying.

See Also
HitTest, KeepSelectionOnNavigation
VARIANT_BOOL ShowTodayDate
getset

Specifies whether the “Today” date is displayed at the bottom of the control

Retrieves or sets whether the “Today” date is displayed at the bottom of the control. If set to True, it is displayed; otherwise not.

See Also
HighlightTodayDate, GetMaxTodayWidth
VARIANT_BOOL ShowTrailingDates
getset

Specifies whether dates from the previous or next month are displayed

Retrieves or sets whether dates from the previous or next month are displayed to fill up weeks that start or end in the previous or next month. If set to True, such trailing dates are displayed; otherwise not.

Remarks
Requires comctl32.dll version 6.10 or higher.
See Also
StartOfWeek
VARIANT_BOOL ShowWeekNumbers
getset

Specifies whether week numbers are displayed to the left of each row of days

Retrieves or sets whether week numbers are displayed to the left of each row of days. Week 1 is defined as the first week that contains at least four days. If set to True, week numbers are displayed; otherwise not.

See Also
StartOfWeek
StartOfWeekConstants StartOfWeek
getset

Specifies which day is handled as the first day of a week

Retrieves or sets the day that is handled as the first day of a week. Any of the values defined by the StartOfWeekConstants enumeration is valid.

See Also
StartOfWeekConstants
VARIANT_BOOL SupportOLEDragImages
getset

Controls the control's behavior in drag'n'drop operations

Retrieves or sets whether the control creates an IDropTargetHelper object, so that a drag image can be displayed during OLE drag'n'drop. If set to True, the control creates the object; otherwise not.

Remarks
Requires shell32.dll version 5.0 or higher.
See Also
RegisterForOLEDragDrop, IDropTargetHelper
OLE_COLOR TitleBackColor
getset

Specifies the title portion's background color

Retrieves or sets the background color of the title portion of the control.

Remarks
Starting with comctl32.dll version 6.10, this property isn't supported for themed calendar controls.
See Also
BackColor, ForeColor, TitleForeColor, MonthBackColor, TrailingForeColor
OLE_COLOR TitleForeColor
getset

Specifies the title portion's text color

Retrieves or sets the text color of the title portion of the control.

Remarks
Starting with comctl32.dll version 6.10, this property isn't supported for themed calendar controls.
See Also
BackColor, ForeColor, TitleBackColor, MonthBackColor, TrailingForeColor
DATE TodayDate
getset

Specifies the date that is displayed as the “Today” date

Retrieves or sets the date that is displayed as the “Today” date. If this property is set to zero, the system default is used.

See Also
ShowTodayDate, HighlightTodayDate, CaretDate, GetMaxTodayWidth
OLE_COLOR TrailingForeColor
getset

Specifies the text color of trailing dates

Retrieves or sets the text color of trailing dates.

Remarks
Starting with comctl32.dll version 6.10, this property isn't supported for themed calendar controls.
See Also
BackColor, ForeColor, TitleBackColor, TitleForeColor, MonthBackColor
VARIANT_BOOL UsePadding
getset

Controls the control's padding

Retrieves or sets whether the control applies the padding specified by the Padding property. If set to True, the padding is applied; otherwise not.

Remarks
Requires comctl32.dll version 6.10 or higher.
See Also
Padding
VARIANT_BOOL UseShortestDayNames
getset

Specifies whether the control uses the shortest instead of the short day names

Retrieves or sets whether the control uses the shortest instead of the short day names for the day of week column header. If set to True, the shortest, otherwise the short names are used.

Remarks
Not all locales seem to define shortest day names. Therefore it may happen that there is no difference between short day names and shortest day names.
Requires comctl32.dll version 6.10 or higher.
VARIANT_BOOL UseSystemFont
getset

Specifies whether the control uses the system font

Retrieves or sets whether the control uses the system's default dialog font or the font specified by the Font property. If set to True, the system font; otherwise the specified font is used.

Remarks
Starting with comctl32.dll version 6.10, this property isn't supported for themed calendar controls.
See Also
Font
BSTR Version
get

Retrieves the control's version

Remarks
This property is read-only.
ViewConstants View
getset

Specifies the control's view mode

Retrieves or sets the control's view mode. Any of the values defined by the ViewConstants enumeration is valid.

Remarks
Requires comctl32.dll version 6.10 or higher.
See Also
_ICalendarEvents::ViewChanged, ViewConstants
VARIANT_BOOL DetectDoubleClicks
getset

Specifies whether the control intercepts double clicks

Enables or disables double clicks. If set to True, double clicks are accepted; otherwise all clicks are handled as single clicks.

Remarks
Enabling double-clicks may lead to accidental double-clicks, e.g. if the user rapidly clicks onto the navigation arrows for selecting another month.
See Also
_ICalendarEvents::DblClick, _ICalendarEvents::MDblClick, _ICalendarEvents::RDblClick