Reputation: 11
I want to create a transparent borderless window. By word transparent i mean per-pixel transparency, so it has a transparent background. It has to support minimize and maximize animations.
i tried doing so:
MARGINS margins = { -1 };
DwmExtendFrameIntoClientArea( hwnd, &margins );
DWMNCRENDERINGPOLICY ncrp = DWMNCRP_DISABLED;
DwmSetWindowAttribute( hwnd, DWMWA_NCRENDERING_POLICY, &ncrp, sizeof( ncrp ) );
LRESULT WINAPI WndProc( ... ){
switch ( msg )
{
...
case WM_NCCALCSIZE: return 0;
}
}
but i always get the same problem. non-dwm window border appears for a frame everytime i focus/unfocus the window. here is how it looks.
removing EX_ styles doesn't fix it.
Upvotes: 0
Views: 104