HeaderPane
Main
Hide
Share Link
Print

PreferredHeight

Returns the height a date field control needs for its font and border.

C

int WINAPI SftDate_GetPreferredHeight(HWND hwndCtl);

C++

int CSftDate::GetPreferredHeight() const;

Parameters

hwndCtl

The window handle of the date field control (SftDate).

Returns

The return value is the height in pixels, or 0 if hwndCtl is not a date field control.

Comments

The GetPreferredHeight function returns the window height a date field control needs for its font (WM_SETFONT), border (SetBorderStyle) and the DPI of its monitor (GetDPI).

A field that sizes itself (SetAutoSize, the default) keeps this height whenever the font, border or DPI changes; its width is defined by the application. GetPreferredSize also returns a width that fits the current value with the check box and buttons.

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


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