For questions about the Desktop Window Manager (DWM), which handles desktop composition in Windows Vista and later versions. For questions about the Dynamic Window Manager (DWM) for X, use [x-dwm].
Questions tagged [dwm]
255 questions
1
vote
0 answers
Add image to window title bar
I want to add an image to the window's title bar. I know that is not possible with native Winforms tools but it should be able with the WinApi calls.
[DllImport("user32.dll", SetLastError = true)]
private static extern IntPtr…

DerApe
- 3,097
- 2
- 35
- 55
1
vote
0 answers
Why is it my application which contains DWM thumbnail lags when the target app was moved to second monitor?
Scenario:
I have a wpf fullscreen borderless application that displays a live thumbnail of a borderless, fullscreen UWP app that plays video.
My laptop setup includes 1 extended monitor thru HDMI port.
My wpf app can display a live thumbnail of the…

Keinth Mac
- 33
- 3
1
vote
1 answer
Screenshot of the specific window (HWND, HW accelerated)
I need to capture a snapshots/screenshots of the specific window (HWND) that is using HW acceleration and record them to a video stream.
While using BitBlt or PrintWindow I'm able to capture image data only if this window is not HW accelerated, else…

Gediminas
- 1,830
- 3
- 27
- 47
1
vote
1 answer
DwmSetWindowAttribute does not work with DWMWA_CLOAK
I recently started using lower level windows APIsn with C# for an application prototype and I stumble upon a problem that I cannot get my way around: Consider the following piece of code:
public class dW
{
[DllImport("dwmapi.dll")]
public…

Kyle Oliveira
- 187
- 1
- 12
1
vote
3 answers
How easy is it in DWM to make an 'always on top' thumbnail for an existing window
I really like when you hover over a window in Vista on the taskbar and it gives you a little preview. if it is video it even plays in the thumbnail.
Often I really wish I could 'tear off' this little window and keep it as an 'always on top'…

Simon_Weaver
- 140,023
- 84
- 646
- 689
1
vote
2 answers
Programmatically (first-time!) enable aero theme/desktop composition
I want to enable desktop composition on a Windows 7 machine programmatically (preferrable C#) and already tried to do it with the infamous DwmEnableComposition P/Invoke. However, this does not seem to work if DWM has never been enabled (and the…

Christoph
- 1,964
- 2
- 27
- 44
1
vote
0 answers
Screen capturing based on Windows Magnification API fails on Windows 7 64 bit With Aero theme disabled
I'm trying to capture the desktop screen using Windows Magnification APIs based on code sample given in https://www.codeproject.com/Articles/607288/Screenshot-using-the-Magnification-library?msg=5570528#xx5570528xx.
The program (32bit executable)…

iamrameshkumar
- 1,328
- 1
- 14
- 34
1
vote
1 answer
DwmGetWindowAttribute doesn't get the correct Rect size for MediaPlayer if it's in full screen mode
I am trying to get application size using this code :
[DllImport(@"dwmapi.dll")]
private static extern int DwmGetWindowAttribute(IntPtr hwnd, int dwAttribute, out Rect pvAttribute, int cbAttribute);
[Serializable,…

Ebram
- 1,042
- 1
- 13
- 26
1
vote
0 answers
How does DwmQueryThumbnailSourceSize determine window size?
I wrote an Alt-Tab replacement application. I use DwmQueryThumbnailSourceSize to determine window sizes, and construct my layout. However this function is available only after I have already constructed the Dwm thumbnails. If I knew the window sizes…

Frigo
- 1,709
- 1
- 14
- 32
1
vote
1 answer
How to enable windows docking with frameless electron window
So electron has a feature where you can make a BrowserWindow frameless with 'frame' option set to false. From version 1.4.14 and onwards, docking (with windows key + left/right) or dragging the window (and maximizing) does not work anymore.
I can't…

Perfection
- 721
- 4
- 12
- 36
1
vote
0 answers
Detect show/hide Task View (Win+Tab)
I'm developing a Application Desktop Toolbar (next Toolbar). Toolbar receives ABN_FULLSCREENAPP notification when a fullscreen application window is opened or closed (e.g. through F11). A window is fullscreen when its client area occupies the entire…

Asaq
- 521
- 5
- 13
1
vote
2 answers
How do I mimic the windows 7 UI?
I want to try and get the same look as Windows 7, with the aero glass dropping down just a little bit so that there can be a back button/address bar/ search box. Are there any tutorials on how to do this? I really need something simple, as I tried…

Sean
- 8,401
- 15
- 40
- 48
1
vote
1 answer
Windows 10 Desktop Window Manager swap timing?
I have a few questions regarding the Desktop Window Manager (aka DWM) in Windows 10:
Background: For an OpenGL application I wrote in C++ I need precise timing regarding the swap of the front and back buffers in OpenGL and the realization of these…

VoodooCode
- 287
- 2
- 15
1
vote
3 answers
Windows Vista/7 glass completely broken?
I'm trying to get the media player glass effect for an application, but I'm facing roadblocks all around. Is it me, or is it the API?
I started by calling:
MARGINS margins = { -1, -1, -1, -1 };
HRESULT result = ::DwmExtendFrameIntoClientArea(m_hWnd,…

Coder
- 3,695
- 7
- 27
- 42
1
vote
0 answers
How to capture DWM window buffers for virtual reality app
I want to be able to build something similar to the now defunct vr program Envelop. It allows you to interact with your Windows 10 windows in a VR space
https://www.youtube.com/watch?v=XPCq089MQDI
From reading on wikipedia i see that windows write…

Mr Bell
- 9,228
- 18
- 84
- 134