Skip to content

Latest commit

 

History

History
133 lines (107 loc) · 3.48 KB

nf-shellscalingapi-getscalefactorfordevice.md

File metadata and controls

133 lines (107 loc) · 3.48 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:shellscalingapi.GetScaleFactorForDevice
GetScaleFactorForDevice function (shellscalingapi.h)
Gets the preferred scale factor for a display device.
GetScaleFactorForDevice
GetScaleFactorForDevice function [Windows Shell]
shell.getscalefactorfordevice
shellscalingapi/GetScaleFactorForDevice
shell\getscalefactorfordevice.htm
shell
5F312914-03F6-42E0-80F9-761D854A81A3
12/05/2018
GetScaleFactorForDevice, GetScaleFactorForDevice function [Windows Shell], shell.getscalefactorfordevice, shellscalingapi/GetScaleFactorForDevice
shellscalingapi.h
Windows
Windows 8 [desktop apps only]
Windows Server 2012 [desktop apps only]
Shcore.dll
Windows
19H1
GetScaleFactorForDevice
shellscalingapi/GetScaleFactorForDevice
c++
APIRef
kbSyntax
DllExport
Shcore.dll
API-MS-Win-shcore-scaling-l1-1-0.dll
API-MS-Win-shcore-scaling-l1-1-1.dll
API-MS-Win-ShCore-Scaling-l1-1-2.dll
api-ms-win-shcore-scaling-l1.dll
GetScaleFactorForDevice

GetScaleFactorForDevice function

-description

Gets the preferred scale factor for a display device.

Note  This function is not supported as of Windows 8.1. Use GetScaleFactorForMonitor instead.
 

-parameters

-param deviceType [in]

Type: DISPLAY_DEVICE_TYPE

The value that indicates the type of the display device.

-returns

Type: DEVICE_SCALE_FACTOR

A value that indicates the scale factor that should be used with the specified DISPLAY_DEVICE_TYPE.

Return code/value Description
SCALE_100_PERCENT
100
Use a scale factor of 1x.
SCALE_140_PERCENT
140
Use a scale factor of 1.4x.
SCALE_180_PERCENT
180
Use a scale factor of 1.8x.

-remarks

The default DEVICE_SCALE_FACTOR is SCALE_100_PERCENT.

Use the scale factor that is returned to scale point values for fonts and pixel values.

-see-also

GetScaleFactorForMonitor

RegisterScaleChangeEvent

UnregisterScaleChangeEvent