Skip to content

Latest commit

 

History

History
89 lines (66 loc) · 3.3 KB

nf-winuser-setdialogcontroldpichangebehavior.md

File metadata and controls

89 lines (66 loc) · 3.3 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:winuser.SetDialogControlDpiChangeBehavior
SetDialogControlDpiChangeBehavior function (winuser.h)
Overrides the default per-monitor DPI scaling behavior of a child window in a dialog.
SetDialogControlDpiChangeBehavior
SetDialogResizeBehavior
SetDialogResizeBehavior function [High DPI]
hidpi.setdialogresizebehavior
winuser/SetDialogResizeBehavior
hidpi\setdialogresizebehavior.htm
hidpi
52BB557B-0D70-4189-9BD0-EB94188EA4E7
12/05/2018
SetDialogControlDpiChangeBehavior, SetDialogResizeBehavior, SetDialogResizeBehavior function [High DPI], hidpi.setdialogresizebehavior, winuser/SetDialogResizeBehavior
winuser.h
Windows
Windows 10, version 1703 [desktop apps only]
Windows Server 2016 [desktop apps only]
User32.lib
User32.dll
Windows
19H1
SetDialogControlDpiChangeBehavior
winuser/SetDialogControlDpiChangeBehavior
c++
APIRef
kbSyntax
DllExport
User32.dll
SetDialogResizeBehavior

SetDialogControlDpiChangeBehavior function

-description

Overrides the default per-monitor DPI scaling behavior of a child window in a dialog.

-parameters

-param hWnd

A handle for the window whose behavior will be modified.

-param mask

A mask specifying the subset of flags to be changed.

-param values

The desired value to be set for the specified subset of flags.

-returns

This function returns TRUE if the operation was successful, and FALSE otherwise. To get extended error information, call GetLastError.

Possible errors are ERROR_INVALID_HANDLE if passed an invalid HWND, and ERROR_ACCESS_DENIED if the windows belongs to another process.

-remarks

The behaviors are specified as values from the DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS enum. This function follows the typical two-parameter approach to setting flags, where a mask specifies the subset of the flags to be changed.

It is valid to set these behaviors on any window. It does not matter if the window is currently a child of a dialog at the point in time that SetDialogControlDpiChangeBehavior is called. The behaviors are retained and will take effect only when the window is an immediate child of a dialog that has per-monitor DPI scaling enabled.

This API influences individual controls within dialogs. The dialog-wide per-monitor DPI scaling behavior is controlled by SetDialogDpiChangeBehavior.

-see-also

DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS

GetDialogControlDpiChangeBehavior