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;
hwndCtl
The window handle of the date field control (SftDate).
The return value is the height in pixels, or 0 if hwndCtl is not a date field control.
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