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 (margins, forced tab size, etc.) are interpreted relative to the current monitor DPI.
C
void WINAPI SftTabs_SetPixelScaling(HWND hwndCtl, int mode); int WINAPI SftTabs_GetPixelScaling(HWND hwndCtl);
C++
void CSftTabs::SetPixelScaling(int mode); int CSftTabs::GetPixelScaling() const;
hwndCtl
The window handle of the tab control.
mode
Defines the pixel scaling mode. mode can be one of the following values:
| SFTTABS_PIXELSCALING_ASIS | Caller-supplied pixel dimensions are used verbatim, in physical screen pixels. This is the default and preserves the traditional SftTabs/DLL behavior. A margin of 10 is 10 screen pixels on any monitor. |
| SFTTABS_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 margin of 10 set on a 96-DPI monitor is 10 screen pixels at 100%, 15 pixels at 150%, 20 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 (SFTTABS_PIXELSCALING_ASIS or SFTTABS_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 on SFTTABS_CONTROL:
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.
SFTTABS_PIXELSCALING_ASIS (the default) preserves back-compatible behavior. A margin of 10 set on a 96-DPI monitor is 10 pixels on any monitor - useful when the application is already DPI-aware and performs its own scaling, but means the margin appears physically smaller on high-DPI monitors.
SFTTABS_PIXELSCALING_STRETCH makes caller-supplied pixel values resolution-independent. Margins, indentation and forced tab sizes stay physically the same 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.
See Also C/C++ API | C++ Classes | Notifications
