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 tree control is currently displayed on.
C
int WINAPI SftTree_GetDPI(HWND hwndCtl); int WINAPI SftTreeSplit_GetDPI(HWND hwndCtl);
C++
int CSftTree::GetDPI() const; int CSftTreeSplit::GetDPI() const;
hwndCtl
The window handle of the tree control.
The return value is the effective DPI (dots-per-inch) for the monitor the tree 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 tree control is currently displayed on. The tree control uses this value internally to scale row height, grid-line thickness, scroll-bar metrics, drag thresholds, 3D frame widths, the column drop-down button, expand / collapse glyphs and the resize-handle bitmap via GetSystemMetricsForDpi and MulDiv.
Applications that host SftTree controls in a Per-Monitor v2 DPI-aware window receive a SFTTREEN_DPI_CHANGED notification whenever the window moves to a monitor of a different DPI, or the system DPI changes. In response, the application should:
Callers that have opted into SFTTREE_PIXELSCALING_STRETCH do not need to rescale column widths, indentation, row-header width, horizontal extent or item heights - the tree control handles those automatically. Callers that have opted into SFTTREE_IMAGESCALING_STRETCH do not need to re-register images at the new physical size.
Owner-draw callbacks receive the current DPI in SFTTREE_OWNERDRAW'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 | Categories | Notifications
