Disable DWM programatically for a child window or on a per-window basis

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello guys.
This might not be in the right section, but I couldnt find a better one. My question relates to DWM, more specifically DWM composition under Windows Vista/7. As some of you might know you can programatically expand a windows aero border and draw on it
using API functions like <span style="font-family:Courier New; font-size:13px; line-height:normal DwmExtendFrameIntoClientArea or <span style="font-family:Courier New; font-size:13px; line-height:normal DwmEnableBlurBehindWindow (example
http://code.msdn.microsoft.com/windowsdesktop/CSWinFormExAeroToClient-3b123c56
here ).
The problem Im currently facing is this: I am developing a Windows application and I have a form which I want to move into an existing window (with SetParent API). The problem is that the window I want to move my form into has an aero background.
If I put a child window in it, the background of the child window turns aero as well. So my forms background becomes aero too, no matter the background it had before. I tried to change the background of the form to a picture and its better indeed but still
not enough: if I have a control in my form (label, textbox, etc) that control has an aero background too. I wouldnt like to disable DWM composition on a system-wide basis since the application Im creating will be distributed and it might annoy the users.
So I guess my question is: how can I (and is it even possible to) disable DWM composition for my window only? (also given that the parent window has an aero background)
Ive been trying all kinds of stuff for 7 hours now and Im getting tired of it.
Thank you for your answers in advance.

View the full article
 
Back
Top