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 caller-supplied pixel dimensions (column widths, indentation, etc.) are interpreted relative to the current monitor DPI.
C
void WINAPI SftTree_SetPixelScaling(HWND hwndCtl, int mode); int WINAPI SftTree_GetPixelScaling(HWND hwndCtl); void WINAPI SftTreeSplit_SetPixelScaling(HWND hwndCtl, int mode); int WINAPI SftTreeSplit_GetPixelScaling(HWND hwndCtl);
C++
void CSftTree::SetPixelScaling(int mode); int CSftTree::GetPixelScaling() const; void CSftTreeSplit::SetPixelScaling(int mode); int CSftTreeSplit::GetPixelScaling() const;
hwndCtl
The window handle of the tree control.
mode
Defines the pixel scaling mode. mode can be one of the following values:
| SFTTREE_PIXELSCALING_ASIS | Caller-supplied pixel dimensions are used verbatim, in physical screen pixels. This is the default and preserves the traditional SftTree/DLL behavior. A column width of 100 is 100 screen pixels on any monitor. |
| SFTTREE_PIXELSCALING_STRETCH | Caller-supplied pixel dimensions are interpreted as 96-DPI reference pixels and are scaled by the factor currentDPI / 96 each time they are used. A column width of 100 set on a 96-DPI monitor is 100 screen pixels at 100%, 150 pixels at 150%, 200 pixels at 200%. Storage and the corresponding Get* functions always return the value in caller-reference (96-DPI) units. |
GetPixelScaling returns a value indicating the current pixel scaling mode (SFTTREE_PIXELSCALING_ASIS or SFTTREE_PIXELSCALING_STRETCH).
The SetPixelScaling and GetPixelScaling functions define how caller-supplied pixel dimensions are interpreted relative to the current monitor DPI. The setting affects the following caller-supplied values:
SetPixelScaling is independent of SetImageScaling. SetPixelScaling controls how caller-supplied pixel dimensions are interpreted; SetImageScaling controls the size at which images are drawn. Either can be used without the other.
SFTTREE_PIXELSCALING_ASIS (the default) preserves back-compatible behavior. A column width of 100 set on a 96-DPI monitor is 100 pixels on any monitor - useful when the application is already DPI-aware and performs its own scaling, but means the column appears physically smaller on high-DPI monitors.
SFTTREE_PIXELSCALING_STRETCH makes caller-supplied pixel values resolution-independent. Column widths, indentation and row-header widths stay physically the same size as the user moves between monitors of different DPI. Because storage and the corresponding Get* functions always return caller-reference units, serialized configurations remain portable between machines of different DPI and between different monitors of the same machine.
Splitter bar width (SetSplitterWidth) is always scaled with DPI and is not affected by this setting, as it is a control-owned rendering metric rather than a caller-supplied dimension.
See Also C/C++ API | Categories | Notifications
