dwm

How to change Windows 7 Aero / Window border color programatically?

时间秒杀一切 提交于 2019-12-04 12:11:36
问题 I am thinking of making a program that would change the Windows 7 aero color according to the battery level. I am fairly new to c# and I would like to know how to change the Windows 7 Aero programmatically I have this code [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 static extern void

Acrylic material in win32 app

寵の児 提交于 2019-12-04 10:41:57
Microsoft recently revealed their new "fluent" design langauge, and one part of it is the "acrylic" material . This effect makes an element transparent and blurs the background. It can either be applied to a window, such that parts of underlying windows shine though (background acrylic), or to individual elements in the window, so other controls shine through (in-app acrylic). It is conceptually and visually very similar to vibrancy on macOS. It is implemented as a special Brush in XAML, but I wonder it there is a way to use it (background acrylic) in a regular Win32 app? The effect looks very

Tests with TextBox under DWM glass

落花浮王杯 提交于 2019-12-04 10:37:05
问题 I'm trying to deal with TextBox text's color under DWM Glass. I read a lot of material, still no perfect solution. The almost perfect results code i found here: http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/316a178e-252b-480d-8cc9-85814c2073d8/ , but it has a lot of flicking and event-specific operations (For example: type some text and push Home button). I trying to solve those problems. The following code is a mutation of the original code, but it does not relies on any

Delphi: How to remove subclasses in reverse order?

跟風遠走 提交于 2019-12-04 09:58:49
Mike Lischke's TThemeServices subclasses Application.Handle , so that it can receive broadcast notifications from Windows (i.e. WM_THEMECHANGED ) when theming changes. It subclasses the Application object's window: FWindowHandle := Application.Handle; if FWindowHandle <> 0 then begin // If a window handle is given then subclass the window to get notified about theme changes. {$ifdef COMPILER_6_UP} FObjectInstance := Classes.MakeObjectInstance(WindowProc); {$else} FObjectInstance := MakeObjectInstance(WindowProc); {$endif COMPILER_6_UP} FDefWindowProc := Pointer(GetWindowLong(FWindowHandle, GWL

WINAPI/DWMAPI Blur-behind window with irregular shape

旧城冷巷雨未停 提交于 2019-12-03 16:18:17
NB: THIS IS NOT A QUESTION ABOUT A BORDERLESS WINDOW. So, I stumbled upon this program while I was exploring my Start menu the other day on Windows 7: It's a native Windows program, called "Math Input Panel." Now, I'm curious about the window shape. I know that it's not completely drawn by DWM, because the borders and Close button look fishy and the window has no drop shadow (I have drop shadows enabled). My first guess as to how this was made would be using DwmEnableBlurBehindWindow , but I can't imagine that works on irregular window shapes, does it? (Or is there another way to do this, or

Custom dwm drawn window frame flickers on resizing if the window contains a HwndHost element

时光总嘲笑我的痴心妄想 提交于 2019-12-03 14:44:26
I've been thinking about this for a couple of days but I think I lack some basic understanding of how windows and wpf work internally to figure this out. The problem is this: I created a window that should let me draw wpf controls on an aero title bar (like office). This works fine as long as I don't add a Hwndhost element to the window, in this case whenever i resize it the frame and the HwndHost start to flicker pretty badly (other elements seem to render properly). I also tried using the custom frame window implementation from the WPF Shell Integration library and the result is the same, so

OpenGL flickering/damaged with window resize and DWM active

僤鯓⒐⒋嵵緔 提交于 2019-12-03 14:41:50
问题 I have a wxWidgets application that has a number of child opengl windows. I'm using my own GL canvas class, not the wx one. The windows share their OpenGL context. I don't think the fact it is wxwidgets is really relevant here. The opengl windows are children of a windows that are siblings of one another, contained within a tab control. Kind of an MDI style interface, but it is not an MDI window.. Each one can be individually resized. All works lovely unless Aero is enabled and the DWM is

DwmExtendFrameIntoClientArea strange behaviour on Windows 10

青春壹個敷衍的年華 提交于 2019-12-03 13:48:17
I'm having some trouble extending the window frames using DwmExtendFrameIntoClientArea on Windows 10. The images below show the behaviour I'm getting: The white titlebar colour is extended from the top, while from the sides and the bottom it extends the coloured edge of the window. If I set the margins all to -1 to extend the frames all the way, the window is filled with white and loses its coloured edge altogether: This result is very inconsistent, I was expecting the white colour to be extended on all sides of the window, similar to the way the coloured frame is extended in Windows 8, or the

DwmExtendFrameIntoClientArea without Aero Glass

泄露秘密 提交于 2019-12-03 12:10:03
问题 Using the DwmExtendFrameIntoClientArea API call with Aero Glass enabled works just fine. However, I want it to work when Aero Glass is disabled as well, like how it works in the Windows control panel: Notice how the frame has extended into the client area, even though Aero Glass is disabled? When I make the DwmExtendFrameIntoClientArea API call in my application, the returned HRESULT is definitely not success, and my application ends up looking like this: http://img197.imageshack.us/img197

OpenGL flickering/damaged with window resize and DWM active

╄→尐↘猪︶ㄣ 提交于 2019-12-03 05:29:23
I have a wxWidgets application that has a number of child opengl windows. I'm using my own GL canvas class, not the wx one. The windows share their OpenGL context. I don't think the fact it is wxwidgets is really relevant here. The opengl windows are children of a windows that are siblings of one another, contained within a tab control. Kind of an MDI style interface, but it is not an MDI window.. Each one can be individually resized. All works lovely unless Aero is enabled and the DWM is active. Resizing any window (not even the opengl ones) causes all of the opengl windows to flicker