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
Defines how images drawn by the tree control are scaled relative to the current monitor DPI.
C
void WINAPI SftTree_SetImageScaling(HWND hwndCtl, int mode); int WINAPI SftTree_GetImageScaling(HWND hwndCtl); void WINAPI SftTreeSplit_SetImageScaling(HWND hwndCtl, int mode); int WINAPI SftTreeSplit_GetImageScaling(HWND hwndCtl);
C++
void CSftTree::SetImageScaling(int mode); int CSftTree::GetImageScaling() const; void CSftTreeSplit::SetImageScaling(int mode); int CSftTreeSplit::GetImageScaling() const;
hwndCtl
The window handle of the tree control.
mode
Defines the image scaling mode. mode can be one of the following values:
| SFTTREE_IMAGESCALING_ASIS | Every image is drawn at its native pixel size, regardless of the current monitor DPI. This is the default and preserves the traditional SftTree/DLL behavior. On high-DPI monitors, images supplied at 96 DPI appear physically smaller than the surrounding text. |
| SFTTREE_IMAGESCALING_STRETCH | Every image is scaled by the factor currentDPI / 96 when drawn. On a 150% DPI monitor, a 16-pixel-tall image is drawn 24 pixels tall; on a 200% monitor it is drawn 32 pixels tall. Bitmap images use StretchBlt with HALFTONE mode; GDI+ images use InterpolationModeHighQualityBicubic. |
GetImageScaling returns a value indicating the current image scaling mode (SFTTREE_IMAGESCALING_ASIS or SFTTREE_IMAGESCALING_STRETCH).
The SetImageScaling and GetImageScaling functions define how images drawn by the tree control are scaled relative to the current monitor DPI. The setting applies to every image the control draws:
SetImageScaling is independent of SetPixelScaling. SetImageScaling controls the size at which images are drawn; SetPixelScaling controls how caller-supplied pixel dimensions (column widths, indentation, row-header width, etc.) are interpreted. Either can be used without the other.
SFTTREE_IMAGESCALING_ASIS (the default) preserves back-compatible behavior - applications that already supply DPI-appropriate images (or that only target 96 DPI) do not need to change anything.
SFTTREE_IMAGESCALING_STRETCH is the simplest way to make an existing application look correct on high-DPI monitors without shipping multiple image sizes, at the cost of some visual softness from the stretch filter. For best image quality at high DPI, supply higher-resolution master images and leave the mode at SFTTREE_IMAGESCALING_ASIS.
When the control is hosted on a Per-Monitor v2 DPI-aware window, the control re-renders automatically on DPI change. Callers who have opted into SFTTREE_IMAGESCALING_STRETCH do not need to re-register images in response to SFTTREEN_DPI_CHANGED.
See Also C/C++ API | Categories | Notifications
