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 tab control are scaled relative to the current monitor DPI.
C
void WINAPI SftTabs_SetImageScaling(HWND hwndCtl, int mode); int WINAPI SftTabs_GetImageScaling(HWND hwndCtl);
C++
void CSftTabs::SetImageScaling(int mode); int CSftTabs::GetImageScaling() const;
hwndCtl
The window handle of the tab control.
mode
Defines the image scaling mode. mode can be one of the following values:
| SFTTABS_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 SftTabs/DLL behavior. On high-DPI monitors, images supplied at 96 DPI appear physically smaller than the surrounding text. |
| SFTTABS_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 (SFTTABS_IMAGESCALING_ASIS or SFTTABS_IMAGESCALING_STRETCH).
The SetImageScaling and GetImageScaling functions define how images drawn by the tab 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 (margins, indentation, forced tab size, etc.) are interpreted. Either can be used without the other.
SFTTABS_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.
SFTTABS_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 SFTTABS_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 SFTTABS_IMAGESCALING_STRETCH do not need to re-register images in response to SFTTABSN_DPI_CHANGED.
See Also C/C++ API | C++ Classes | Notifications
