Returns the effective DPI for the monitor the combo box control is currently displayed on.
C
int WINAPI SftBox_GetDPI(HWND hwndCtl);
C++
int CSftBox::GetDPI() const;
hwndCtl
The window handle of the combo box control.
The return value is the effective DPI (dots-per-inch) for the monitor the combo box control is currently displayed on. 96 represents 100% scaling, 120 represents 125%, 144 represents 150%, 192 represents 200%, and so on.
The GetDPI function returns the effective DPI for the monitor the combo box control is currently displayed on. The combo box control uses this value to scale its own dimensions.
Applications that host combo box controls in a Per-Monitor DPI-aware window receive a SFTBOXN_DPI_CHANGED notification whenever the DPI of the combo box control changes, for example when the window moves to a monitor with a different DPI. If the dropdown portion of a dropdown or dropdown list combo box is visible at that time, it is hidden. In response to the notification, the application should:
Applications that have selected SFTBOX_PIXELSCALING_STRETCH using SetPixelScaling do not need to rescale column widths, indentation, row header width, horizontal extent, minimum and maximum item heights or the dropdown portion's width and height defined in pixels - the combo box control handles those automatically. Applications that have selected SFTBOX_IMAGESCALING_STRETCH using SetImageScaling do not need to replace pictures, as the combo box control scales all images.
See Also C/C++ API | Categories | Notifications