GetDpiForSystem function
Returns the system DPI.
Syntax
UINT WINAPI GetDpiForSystem(void);
Parameters
This function has no parameters.
Return value
The system DPI value.
Remarks
The return value will be dependent based upon the calling context. If the current thread has a DPI_AWARENESS value of DPI_AWARENESS_UNAWARE, the return value will be 96. That is because the current context always assumes a DPI of 96. For any other DPI_AWARENESS value, the return value will be the actual system DPI.
You should not cache the system DPI, but should use GetDpiForSystem whenever you need the system DPI value.
Requirements
|
Minimum supported client |
Windows 10 [desktop apps only] |
|---|---|
|
Minimum supported server |
None supported |
|
Header |
|
|
Library |
|
|
DLL |
|
See also