diff --git a/PInvoke/DwmApi/DwmApi.cs b/PInvoke/DwmApi/DwmApi.cs index a927ec10..3f8b0973 100644 --- a/PInvoke/DwmApi/DwmApi.cs +++ b/PInvoke/DwmApi/DwmApi.cs @@ -205,6 +205,20 @@ namespace Vanara.PInvoke DWMTRANSITION_OWNEDWINDOW_REPOSITION = 0, } + /// Flags used by the DwmSetWindowAttribute function to specify the rounded corner preference for a window. + [PInvokeData("dwmapi.h")] + public enum DWM_WINDOW_CORNER_PREFERENCE + { + /// Let the system decide when to round window corners. + DWMWCP_DEFAULT = 0, + /// Never round window corners. + DWMWCP_DONOTROUND = 1, + /// Round the corners, if appropriate. + DWMWCP_ROUND = 2, + /// Round the corners if appropriate, with a small radius. + DWMWCP_ROUNDSMALL = 3 + } + /// /// Flags used by the DwmGetWindowAttribute and DwmSetWindowAttribute functions to specify window attributes for non-client rendering. /// @@ -349,7 +363,61 @@ namespace Vanara.PInvoke /// [CorrespondingType(typeof(bool), CorrespondingAction.Set)] DWMWA_FREEZE_REPRESENTATION, - } + /// + /// Use with DwmSetWindowAttribute. Enables a non-UWP window to use host backdrop brushes. If this flag is set, then a Win32 app + /// that calls Windows::UI::Composition APIs can build transparency effects using the host backdrop brush + /// (see Compositor.CreateHostBackdropBrush). The pvAttribute parameter points to a value of type BOOL. TRUE to enable host + /// backdrop brushes for the window, or FALSE to disable it. + ///Windows 10 and earlier: This value is not supported. + /// + [CorrespondingType(typeof(bool), CorrespondingAction.Set)] + DWMWA_USE_HOSTBACKDROPBRUSH, + /// + /// Use with DwmSetWindowAttribute. Allows the window frame for this window to be drawn in dark mode colors when the dark mode + /// system setting is enabled. For compatibility reasons, all windows default to light mode regardless of the system setting. + /// The pvAttribute parameter points to a value of type BOOL. TRUE to honor dark mode for the window, FALSE to always + /// use light mode. + /// Windows 10 and earlier: This value is not supported. + /// + [CorrespondingType(typeof(bool), CorrespondingAction.Set)] + DWMWA_USE_IMMERSIVE_DARK_MODE = 20, + /// + /// Use with DwmSetWindowAttribute. Specifies the rounded corner preference for a window. The pvAttribute parameter points + /// to a value of type DWM_WINDOW_CORNER_PREFERENCE. + /// Windows 10 and earlier: This value is not supported. + /// + [CorrespondingType(typeof(DWM_WINDOW_CORNER_PREFERENCE), CorrespondingAction.Set)] + DWMWA_WINDOW_CORNER_PREFERENCE = 33, + /// + /// Use with DwmSetWindowAttribute. Specifies the color of the window border. The pvAttribute parameter points to a value + /// of type COLORREF. The app is responsible for changing the border color according to state changes, such as a change + /// in window activation. + /// Windows 10 and earlier: This value is not supported. + /// + [CorrespondingType(typeof(COLORREF), CorrespondingAction.Set)] + DWMWA_BORDER_COLOR, + /// + /// Use with DwmSetWindowAttribute. Specifies the color of the caption. The pvAttribute parameter points to a value + /// of type COLORREF. + /// Windows 10 and earlier: This value is not supported. + /// + [CorrespondingType(typeof(COLORREF), CorrespondingAction.Set)] + DWMWA_CAPTION_COLOR, + /// + /// Use with DwmSetWindowAttribute. Specifies the color of the caption text. The pvAttribute parameter points to a value + /// of type COLORREF. + /// Windows 10 and earlier: This value is not supported. + /// + [CorrespondingType(typeof(COLORREF), CorrespondingAction.Set)] + DWMWA_TEXT_COLOR, + /// + /// Use with DwmGetWindowAttribute. Retrieves the width of the outer border that the DWM would draw around this window. + /// The value can vary depending on the DPI of the window. The pvAttribute parameter points to a value of type UINT. + /// Windows 10 and earlier: This value is not supported. + /// + [CorrespondingType(typeof(uint), CorrespondingAction.Set)] + DWMWA_VISIBLE_FRAME_BORDER_THICKNESS + } /// Identifies the gesture type specified in DwmRenderGesture. [PInvokeData("dwmapi.h")]