dwm

Background Color Artifact in Window's Composition Engine (DWM)

若如初见. 提交于 2020-08-10 19:56:47
问题 Context from Kenny Kerr's blog: Windows Vista introduced a service called the Desktop Window Manager. The name was and continues to be misleading. Think of it as the Windows composition engine or compositor. This composition engine completely changed the way application windows are rendered on the desktop. Rather than allowing each window to render directly to the display, or display adapter, every window renders to an off-screen surface or buffer. The system allocates one such surface per

Background Color Artifact in Window's Composition Engine (DWM)

匆匆过客 提交于 2020-08-10 19:55:44
问题 Context from Kenny Kerr's blog: Windows Vista introduced a service called the Desktop Window Manager. The name was and continues to be misleading. Think of it as the Windows composition engine or compositor. This composition engine completely changed the way application windows are rendered on the desktop. Rather than allowing each window to render directly to the display, or display adapter, every window renders to an off-screen surface or buffer. The system allocates one such surface per

Why does DwmGetWindowAttribute with DWMWA_EXTENDED_FRAME_BOUNDS behave unexpectedly when switching monitors?

余生长醉 提交于 2020-05-15 09:58:05
问题 When my WinForm application is moved from a primary monitor to a secondary monitor, the bounds (Height and Width of the Window) value returned by these properties and winapi function does not change : Form.Bounds Form.Size GetWindowRect() But the value returned by DwmGetWindowAttribute with DWMWA_EXTENDED_FRAME_BOUNDS changes drastically. Edits after suggestion from comments: For instance, in the primary monitor DwmgetWindowAttribute returns a rect of width and height 292, 100 and the other

Vista/7: How to get glass color?

流过昼夜 提交于 2020-01-26 09:39:02
问题 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

C++ WinAPI Conflict between SetLayeredWindowAttributes and BitBlt

廉价感情. 提交于 2020-01-17 12:37:30
问题 I have created a custom window using DWM. I painted the caption by using PaintCustomCaption() ,which is an example from MSDN. It worked properly until I added SetLayeredWindowAttributes(). Window before adding SetLayeredWindowAttributes(hWnd,RGB(0,0,1),0,LWA_COLORKEY); After adding I tried changing RGB values but it was still black except RGB(0,0,0). I wonder if BitBlt() works properly. Edited: The reason I added SetLayeredWindowAttributes is to solve this problem Do you have other ways to

Desktop Window Manager capture the whole screen

冷暖自知 提交于 2020-01-13 17:09:15
问题 I was wondering if anyone could give me a starting point of how to capture the entire screen in Windows Vista/7? I know how to do it in previous versions of Windows, but would really like to keep everything in the D3D stack, without resorting to GDI/BltBit calls. I realize that you can get a live thumbnail of a given window if you have the HWND using the DWM API, but how do you get a "thumbnail" of the entire desktop? Thanks, Alex 回答1: Unfortunately, the functions to do this are in the dwmapi

Disable Background drawing in JFrame in order to properly display Aero (DWM) effects

狂风中的少年 提交于 2020-01-12 03:18:09
问题 I'm having problems using the DWM functionality of Windows Vista/7 on Java windows. I want to make the background of my frame use the Aero style. The Windows API to do so is provide by the function DwmExtendFrameIntoClientArea in the dwmapi library. I've managed to call the procedure properly via JNA, and it does what it is supposed to do (You can see that for example when resizing the frame, before the next repaint you see the proper aero effects in the area not yet painted, see the attached

How to correctly screencapture a specific window on Aero/DWM

倖福魔咒の 提交于 2020-01-11 20:05:50
问题 Background info: I have this MFC application I coded and been using for a long time that pretty much automatically saves screenshots to the hard disk when the user hits the Print Screen/Alt+Print Screen key. I have been putting off using anything related to Aero until now that I've been using Windows 7 RC for a couple of weeks. The problem: I'm using the standard GetDC/BitBlt method to capture the window contents. I have no problems with this method while doing regular full-screen grabs (no

How to correctly screencapture a specific window on Aero/DWM

喜你入骨 提交于 2020-01-11 20:03:32
问题 Background info: I have this MFC application I coded and been using for a long time that pretty much automatically saves screenshots to the hard disk when the user hits the Print Screen/Alt+Print Screen key. I have been putting off using anything related to Aero until now that I've been using Windows 7 RC for a couple of weeks. The problem: I'm using the standard GetDC/BitBlt method to capture the window contents. I have no problems with this method while doing regular full-screen grabs (no

Disable Aero Peek in WPF application

心不动则不痛 提交于 2019-12-30 09:39:49
问题 I want to disable Aero Peek in my WPF application (my application must be visible when user placed the mouse over the button "Show desktop"). I use this PInvoke signature: [Flags] public enum DwmWindowAttribute : uint { DWMWA_NCRENDERING_ENABLED = 1, DWMWA_NCRENDERING_POLICY, DWMWA_TRANSITIONS_FORCEDISABLED, DWMWA_ALLOW_NCPAINT, DWMWA_CAPTION_BUTTON_BOUNDS, DWMWA_NONCLIENT_RTL_LAYOUT, DWMWA_FORCE_ICONIC_REPRESENTATION, DWMWA_FLIP3D_POLICY, DWMWA_EXTENDED_FRAME_BOUNDS, DWMWA_HAS_ICONIC_BITMAP,