SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Returns the effective DPI for the monitor the tab control is currently displayed on.
C
int WINAPI SftTabs_GetDPI(HWND hwndCtl);
C++
int CSftTabs::GetDPI() const;
hwndCtl
The window handle of the tab control.
The return value is the effective DPI (dots-per-inch) for the monitor the tab control is currently displayed on. 96 represents 100% scaling, 120 represents 125%, 144 represents 150%, 192 represents 200%, and so on.
If the host process is not Per-Monitor DPI aware, the return value is the System DPI and does not change for the lifetime of the process.
The GetDPI function returns the effective DPI for the monitor the tab control is currently displayed on. The tab control uses this value internally to scale tab heights, row heights, scroll button sizes, focus rectangle thickness, close/minimize/restore button sizes and 3D border widths via GetSystemMetricsForDpi and MulDiv.
Applications that host SftTabs controls in a Per-Monitor v2 DPI-aware window receive a SFTTABSN_DPI_CHANGED notification whenever the window moves to a monitor of a different DPI, or the system DPI changes. In response, the application should re-send WM_SETFONT with a font sized for the new DPI (SftTabs does not own the application's font) and, if SFTTABS_IMAGESCALING_ASIS is in effect, re-register any caller-supplied tab pictures (SFTTABS_TAB, TabPicture) at the new physical size.
Callers that have opted into SFTTABS_PIXELSCALING_STRETCH do not need to rescale dimensions such as forcedSize, leftMargin, rightMargin or rowIndent - the tab control handles those automatically. Callers that have opted into SFTTABS_IMAGESCALING_STRETCH do not need to re-register tab pictures at the new physical size.
Owner-drawn tabs (SFTTABS_DRAWTABPROC) receive the current DPI in SFTTABS_DRAWINFO's dpi field; owner-draw code should read the field on every paint and must not cache pixel metrics across callbacks.
See Also C/C++ API | C++ Classes | Notifications
