HeaderPane
Main
Hide

SftButton/DLL 3.0 - Button Control

Share Link
Print

SetPixelScaling

Select whether caller-supplied pixel dimensions on SFTBUTTON_CONTROL are interpreted as 96-DPI reference values (and scaled for the current monitor DPI) or used verbatim.

C

void SftButton_SetPixelScaling(HWND hwndCtl, int mode);

C++

void CSftButton::SetPixelScaling(int mode);

Parameters

hwndCtl

The window handle of the button control.

mode

One of:

SFTBUTTON_PIXELSCALING_ASIS (0)Caller-supplied pixel dimensions are used verbatim in physical screen pixels.
SFTBUTTON_PIXELSCALING_STRETCH (1)Default. Caller-supplied pixel dimensions are interpreted as 96-DPI reference pixels. The control multiplies by currentDPI / 96 at render time. Storage and getters always return caller-reference units so serialized configurations stay portable across DPI.

Comments

SetPixelScaling is the caller-metrics side of Per-Monitor DPI awareness. Independent of SetImageScaling - applications can turn on one, both, or neither.

See Also GetPixelScaling | SetImageScaling | Per-Monitor DPI and Scaling


Last Updated 04/26/2026 - (email)
© 2026 Softel vdm, Inc.