You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 26, 2023. It is now read-only.
static PInvoke.User32.CreateWindowEx(PInvoke.User32.WindowStylesEx dwExStyle, short lpClassName, string lpWindowName, PInvoke.User32.WindowStyles dwStyle, int x, int y, int nWidth, int nHeight, System.IntPtr hWndParent, System.IntPtr hMenu, System.IntPtr hInstance, System.IntPtr lpParam) -> System.IntPtr
32
54
static PInvoke.User32.CreateWindowEx(PInvoke.User32.WindowStylesEx dwExStyle, short lpClassName, string lpWindowName, PInvoke.User32.WindowStyles dwStyle, int x, int y, int nWidth, int nHeight, System.IntPtr hWndParent, System.IntPtr hMenu, System.IntPtr hInstance, void* lpParam) -> System.IntPtr
// Copyright (c) All contributors. All rights reserved.
2
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+
namespacePInvoke
5
+
{
6
+
usingSystem;
7
+
8
+
/// <content>
9
+
/// Contains nested type <see cref="DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS"/>
10
+
/// </content>
11
+
publicpartialclassUser32
12
+
{
13
+
/// <summary>
14
+
/// Describes per-monitor DPI scaling behavior overrides for child windows within dialogs. The values in this enumeration are bitfields and can be combined.
15
+
/// </summary>
16
+
/// <remarks>
17
+
/// This enum is used with SetDialogControlDpiChangeBehavior in order to override the default per-monitor DPI scaling behavior for a child window within a dialog.
18
+
///
19
+
/// These settings only apply to individual controls within dialogs. The dialog-wide per-monitor DPI scaling behavior of a dialog is controlled by <see cref="DIALOG_DPI_CHANGE_BEHAVIORS"/>.
20
+
/// </remarks>
21
+
[Flags]
22
+
publicenumDIALOG_CONTROL_DPI_CHANGE_BEHAVIORS:int
23
+
{
24
+
/// <summary>
25
+
/// The default behavior of the dialog manager. The dialog managed will update the font, size, and position of the child window on DPI changes.
26
+
/// </summary>
27
+
DCDC_DEFAULT=0x0000,
28
+
29
+
/// <summary>
30
+
/// Prevents the dialog manager from sending an updated font to the child window via WM_SETFONT in response to a DPI change.
31
+
/// </summary>
32
+
DCDC_DISABLE_FONT_UPDATE=0x0001,
33
+
34
+
/// <summary>
35
+
/// Prevents the dialog manager from resizing and repositioning the child window in response to a DPI change.
// Copyright (c) All contributors. All rights reserved.
2
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+
namespacePInvoke
5
+
{
6
+
usingSystem;
7
+
8
+
/// <content>
9
+
/// Contains nested type <see cref="DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS"/>
10
+
/// </content>
11
+
publicpartialclassUser32
12
+
{
13
+
/// <summary>
14
+
/// In Per Monitor v2 contexts, dialogs will automatically respond to DPI changes by resizing themselves and re-computing the positions of their child windows (here referred to as re-layouting).
15
+
/// This enum works in conjunction with SetDialogDpiChangeBehavior in order to override the default DPI scaling behavior for dialogs.
16
+
/// This does not affect DPI scaling behavior for the child windows of dialogs(beyond re-layouting), which is controlled by <see cref="DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS"/>.
17
+
/// </summary>
18
+
[Flags]
19
+
publicenumDIALOG_DPI_CHANGE_BEHAVIORS:int
20
+
{
21
+
/// <summary>
22
+
/// The default behavior of the dialog manager. In response to a DPI change, the dialog manager will re-layout each control, update the font on each control, resize the dialog, and update the dialog's own font.
23
+
/// </summary>
24
+
DDC_DEFAULT=0x0000,
25
+
26
+
/// <summary>
27
+
/// Prevents the dialog manager from responding to <see cref="WindowMessage.WM_GETDPISCALEDSIZE"/> and <see cref="WindowMessage.WM_DPICHANGED"/>, disabling all default DPI scaling behavior.
28
+
/// </summary>
29
+
DDC_DISABLE_ALL=0x0001,
30
+
31
+
/// <summary>
32
+
/// Prevents the dialog manager from resizing the dialog in response to a DPI change.
33
+
/// </summary>
34
+
DDC_DISABLE_RESIZE=0x0002,
35
+
36
+
/// <summary>
37
+
/// Prevents the dialog manager from re-layouting all of the dialogue's immediate children HWNDs in response to a DPI change.
// Copyright (c) All contributors. All rights reserved.
2
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+
namespacePInvoke
5
+
{
6
+
/// <content>
7
+
/// Contains the <see cref="DPI_AWARENESS"/> nested type.
8
+
/// </content>
9
+
publicpartialclassUser32
10
+
{
11
+
/// <summary>
12
+
/// Identifies the dots per inch (dpi) setting for a thread, process, or window.
13
+
/// </summary>
14
+
publicenumDPI_AWARENESS:int
15
+
{
16
+
/// <summary>
17
+
/// Invalid DPI awareness. This is an invalid DPI awareness value.
18
+
/// </summary>
19
+
DPI_AWARENESS_INVALID=-1,
20
+
21
+
/// <summary>
22
+
/// DPI unaware. This process does not scale for DPI changes and is always assumed to have a scale factor of 100% (96 DPI). It will be automatically scaled by the system on any other DPI setting.
23
+
/// </summary>
24
+
DPI_AWARENESS_UNAWARE=0,
25
+
26
+
/// <summary>
27
+
/// System DPI aware. This process does not scale for DPI changes. It will query for the DPI once and use that value for the lifetime of the process. If the DPI changes, the process will not adjust to the new DPI value. It will be automatically scaled up or down by the system when the DPI changes from the system value.
28
+
/// </summary>
29
+
DPI_AWARENESS_SYSTEM_AWARE=1,
30
+
31
+
/// <summary>
32
+
/// Per monitor DPI aware. This process checks for the DPI when it is created and adjusts the scale factor whenever the DPI changes. These processes are not automatically scaled by the system.
// Copyright (c) All contributors. All rights reserved.
2
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+
namespacePInvoke
5
+
{
6
+
/// <content>
7
+
/// Contains nested type <see cref="DPI_HOSTING_BEHAVIOR"/>
8
+
/// </content>
9
+
publicpartialclassUser32
10
+
{
11
+
/// <summary>
12
+
/// Identifies the DPI hosting behavior for a window. This behavior allows windows created in the thread to host child windows with a different DPI_AWARENESS_CONTEXT.
13
+
/// </summary>
14
+
publicenumDPI_HOSTING_BEHAVIOR:int
15
+
{
16
+
/// <summary>
17
+
/// Invalid DPI hosting behavior. This usually occurs if the previous <see cref="SetThreadDpiHostingBehavior"/> call used an invalid parameter.
18
+
/// </summary>
19
+
DPI_HOSTING_BEHAVIOR_INVALID=-1,
20
+
21
+
/// <summary>
22
+
/// Default DPI hosting behavior. The associated window behaves as normal, and cannot create or re-parent child windows with a different DPI_AWARENESS_CONTEXT.
23
+
/// </summary>
24
+
DPI_HOSTING_BEHAVIOR_DEFAULT=0,
25
+
26
+
/// <summary>
27
+
/// Mixed DPI hosting behavior. This enables the creation and re-parenting of child windows with different DPI_AWARENESS_CONTEXT. These child windows will be independently scaled by the OS.
Copy file name to clipboardExpand all lines: src/User32/User32+WindowMessage.cs
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -982,6 +982,21 @@ public enum WindowMessage : int
982
982
/// </summary>
983
983
WM_DPICHANGED=0x02E0,
984
984
985
+
/// <summary>
986
+
/// For Per Monitor v2 top-level windows, this message is sent to all HWNDs in the child HWDN tree of the window that is undergoing a DPI change. This message occurs before the top-level window receives <see cref="WM_DPICHANGED"/>, and traverses the child tree from the bottom up.
987
+
/// </summary>
988
+
WM_DPICHANGED_BEFOREPARENT=0x02E2,
989
+
990
+
/// <summary>
991
+
/// For Per Monitor v2 top-level windows, this message is sent to all HWNDs in the child HWDN tree of the window that is undergoing a DPI change. This message occurs after the top-level window receives <see cref="WM_DPICHANGED"/>, and traverses the child tree from the top down.
992
+
/// </summary>
993
+
WM_DPICHANGED_AFTERPARENT=0x02E3,
994
+
995
+
/// <summary>
996
+
/// The WM_GETDPISCALEDSIZE message tells the operating system that the window will be sized to dimensions other than the default.
997
+
/// </summary>
998
+
WM_GETDPISCALEDSIZE=0x02E4,
999
+
985
1000
/// <summary>
986
1001
/// An application sends a WM_CUT message to an edit control or combo box to delete (cut) the current selection, if any, in the edit control and copy the deleted text to the clipboard in CF_TEXT format.
0 commit comments