dwm

Handling WM_NCPAINT “breaks” DWM glass rendering on Vista/Aero

余生颓废 提交于 2019-11-27 23:01:53
I am trying to make a window that alternates between having an Aero/Glass and a custom rendered frame (by handling WM_NCPAINT ) based on a user setting. (Windows Vista). DwmComposition is enabled. My app comes up with the glass frame, but as soon as I toggle the setting to trigger the custom WM_NCPAINT codepath then toggle back to use DefWindowProc 's WM_NCPAINT handling, the native frame is now perpetually stuck in the "Vista Basic" style - it's no longer translucent and the caption buttons look different to the normal Aero/Glass ones. I've tried just about every way of poking the window from

Google Chrome style tabs on glass in Delphi

只谈情不闲聊 提交于 2019-11-27 20:13:26
问题 I am trying to implement Google Chrome style tabs, in Windows 7, in a Delphi application. The elements of this are: tabs may extend into the non-client area as they do in google chrome itself. draws properly on Vista and Windows 7 when glass is enabled tabs work just like google chrome, and look like google chrome, over glass. I have found that the challenges I have to overcome are: How do I get a control (VCL control) to extend into the non-client area? (A good sample of a control that does

Windows Aero: What color to paint to make “glass” appear?

让人想犯罪 __ 提交于 2019-11-27 18:09:37
What color must i paint in the client area in order to make glass appear? i've extended the frame of my form into the client area using: DwmExtendFrameIntoClientArea(self.Handle, margins); i cannot find any official documentation from Microsoft on what color and/or alpha the DWM will look for to replace with glass. The documentation on DwmExtendFrameInClientArea doesn't even mention that a custom color is required. There's only hearsay and myth that a special color is even required. The closest i can find is a topic on MSDN: Custom Window Frame Using DWM For the extended frames to be visible,

Delphi support for Aero Glass and the DoubleBuffered property - what is going on and how do we use them?

∥☆過路亽.° 提交于 2019-11-27 09:46:52
问题 I am confused by Delphi 2009/2010 support for the Aero Theme Glass features in Windows, and by what, exactly DoubleBuffered means, and what it has to do with Aero glass. I have found that DoubleBuffered is not only a property in the VCL, it also is found in .net WinForms. Initially I wondered if it set some kind of window style bit used by the common controls library, or what. Why is it used, and when should it be used? [Update: I should state that I know what "double-buffering" is, as a

How do you set the glass blend colour on Windows 10?

余生颓废 提交于 2019-11-27 06:55:29
Using the undocumented SetWindowCompositionAttribute API on Windows 10, it's possible to enable glass for a window. The glass is white or clear, as seen in this screenshot: However, the Windows 10 Start menu and the notification center, which both also uses glass, both blend with the accent colour, like so: How does it do it? Investigations The accent colour in the following examples is a light purple - here's a screenshot from the Settings app: The AccentPolicy structure defined in this example code has accent state, flags and gradient color fields: AccentPolicy = packed record AccentState:

Aero: How to draw solid (opaque) colors on glass?

断了今生、忘了曾经 提交于 2019-11-27 03:50:23
Using GDI+ to draw various colors: brush = new SolidBrush(color); graphics.FillRectangle(brush, x, y, width, height); You'll notice that no opaque color shows properly on glass: How do i draw solid colors on glass? You'll also notice that a fully opaque color is handled differently depending on what color it is: opaque black: fully transparent opaque color: partially transparent opaque white: fully opaque Can anyone point me to the documentation on the desktop compositor that explains how different colors are handled? Update 3 You'll also notice that FillRectangle behaves differently than

How does Windows change Aero Glass color?

白昼怎懂夜的黑 提交于 2019-11-26 21:39:45
问题 I'm using Windows 7 RTM and I wonder how the control panel is able to update the Aero Glass color so smoothly without restarting the DWM (uxsms). DwmSetColorizationColor isn't working any more... 回答1: The following methods should be of interest to you: [DllImport("dwmapi.dll", EntryPoint = "#127", PreserveSig = false)] public static extern void DwmGetColorizationParameters(out WDM_COLORIZATION_PARAMS parameters); [DllImport("dwmapi.dll", EntryPoint = "#131", PreserveSig = false)] public

Detect system theme change in WPF

本秂侑毒 提交于 2019-11-26 21:27:12
问题 I need, for my WPF app, to detect when the DWM is turned on/off or when the system theme changes. There is such an event in WinForms, but I can't see any in WPF. 回答1: I haven't heard of a WinForms event that fires when a WinForms window receives messages from the system, however it has its own WndProc() method that you can override. You're probably confusing window messages for form events. Ah, so it's the StyleChanged event that gets invoked in WinForms windows. The rest of my answer still

Handling WM_NCPAINT “breaks” DWM glass rendering on Vista/Aero

半世苍凉 提交于 2019-11-26 21:17:42
问题 I am trying to make a window that alternates between having an Aero/Glass and a custom rendered frame (by handling WM_NCPAINT ) based on a user setting. (Windows Vista). DwmComposition is enabled. My app comes up with the glass frame, but as soon as I toggle the setting to trigger the custom WM_NCPAINT codepath then toggle back to use DefWindowProc 's WM_NCPAINT handling, the native frame is now perpetually stuck in the "Vista Basic" style - it's no longer translucent and the caption buttons

Vista/7: How to get glass color?

浪尽此生 提交于 2019-11-26 15:52:15
How do you use DwmGetColorizationColor ? The documentation says it returns two values: a 32-bit 0xAARRGGBB containing the color used for glass composition a boolean parameter that is true "if the color is an opaque blend" ( whatever that means ) Here's a color that i like, a nice puke green: You can notice the color is greeny, and the translucent title bar (against a white background) shows the snot color very clearly: i try to get the color from Windows: DwmGetColorizationColor(dwCcolorization, bIsOpaqueBlend); And i get dwColorization: 0x0D0A0F04 bIsOpaqueBlend: false According to the