User32EnableNonClientDpiScaling Method
In high-DPI displays, enables automatic display scaling of the non-client area portions of the specified top-level window.
Must be called during the initialization of that window.
Note: Applications running at a DPI_AWARENESS_CONTEXT of DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
automatically scale their non-client areas by default. They do not need to call this function.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)]
public static bool EnableNonClientDpiScaling(
IntPtr hWnd
)
<DllImportAttribute("User32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function EnableNonClientDpiScaling (
hWnd As IntPtr
) As Boolean
Dim hWnd As IntPtr
Dim returnValue As Boolean
returnValue = User32.EnableNonClientDpiScaling(hWnd)
public:
[DllImportAttribute(L"User32.dll", ExactSpelling = true, SetLastError = true)]
static bool EnableNonClientDpiScaling(
IntPtr hWnd
)
[<DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)>]
static member EnableNonClientDpiScaling :
hWnd : IntPtr -> bool
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
The window that should have automatic scaling enabled.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.