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
You have to paint it to be frame-like yourself.
You have to use DwmIsCompositionEnabled
to check if the DWM is enabled and handle WM_DWMCOMPOSITIONCHANGED
to detect DWM state changed.
Then you have to have to separate way of drawing the window, if DWM is enabled you use DwmExtendFrameIntoClientArea
, if it's disabled you draw the "frame" yourself.
I have no idea how to duplicate the Aero frame in WPF (in my app I have my own color scheme and I'm not using the Auro frame).
This is annoying but when the DWM is disabled the system falls back to XP-style drawing and none of the DWM's services work - even those that aren't related to the glass effect.