Is there a way to retrieve the margins that were set by DwmExtendFrameIntoClientArea
?
I've scanned the documentation. I would have expected DwmGetWindowAttribute
to be the most logical place to look it up.
(What I would like to do is discern what portion of an inserted child should be painted black to allow Aero glass effects through and what portion should be painted the parent's background colour.)
There is no way to do this. The developer is expected to know the size of the frame they extended into the client area.
MARGINS g_Margins;
g_Margins.cxLeftWidth = 0;
g_Margins.cxRightWidth = 0;
g_Margins.cyTopHeight = 15*fontHeight;
g_margins.cyBottomHeight = 7*fontHeight;
DwmExtendFrameIntoClientArea(g_hwnd, g_margins);
Note: Any code released into public domain. No attribution required.