HeaderPane
Main
Hide
Share Link
Print

InitialView

Defines the view a calendar shows first.

C

int WINAPI SftDate_GetInitialView(HWND hwndCtl);
BOOL WINAPI SftDate_SetInitialView(HWND hwndCtl, int view);

C++

int CSftDate::GetInitialView() const;
int CSftCalendar::GetInitialView() const;
BOOL CSftDate::SetInitialView(int view);
BOOL CSftCalendar::SetInitialView(int view);

Parameters

hwndCtl

The window handle of the month calendar control (SftCalendar), or of the date field control (SftDate) whose dropdown calendar is affected.

view

The view. view can be one of the following values:

SFTDATE_VIEW_MONTHThe days of a month. This is the default.
SFTDATE_VIEW_YEARThe months of a year.
SFTDATE_VIEW_DECADEThe years of a decade.
SFTDATE_VIEW_CENTURYThe decades of a century.

Returns

GetInitialView returns the initial view, one of the values listed above.

SetInitialView returns TRUE if the value is valid, otherwise FALSE.

Comments

The GetInitialView and SetInitialView functions define and retrieve the view a calendar shows first. A month calendar control switches to it when it is set; a date field control's dropdown calendar shows it each time the dropdown opens.

A view that is not allowed (SetAllowedViews) is replaced by the nearest allowed view. The view the user is in is retrieved using GetView (month calendar control).

The setting applies to a month calendar control and to the dropdown calendar of a date field control.

See Also C/C++ API | Categories | Notifications


Last Updated 11/26/2026 - (email)
© 2026 Softel vdm, Inc.