We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win7以上可考虑如下方式:
static bool IsCompositionEnabled() { static int NTVer = 6; if (NTVer < 6) return false; BOOL enabled = FALSE; DwmIsCompositionEnabled(&enabled); return enabled; } if (bShadow) { if(IsCompositionEnabled()) { // apply shadow int v = 2; DwmSetWindowAttribute(m_hWnd, 2, &v, 4); MARGINS margins = {1, 1, 1, 1}; DwmExtendFrameIntoClientArea(m_hWnd, &margins); } else { ; // Use CS_DROPSHADOW } }
The text was updated successfully, but these errors were encountered:
Acording to CS_DROPSHADOW referenced from https://docs.microsoft.com/en-us/windows/win32/winmsg/window-class-styles , change HWND_NOTOPMOST to HWND_TOPMOST can solve this issue.
CS_DROPSHADOW
HWND_NOTOPMOST
HWND_TOPMOST
Sorry, something went wrong.
Update: 如果是双显示器,双击对话框,阴影只会在主显示器消失,将对话框拖入副显示器有阴影,再拖回主显示器无阴影,如此往复 【神奇】
最终应当使用DWM实现
halx99
Successfully merging a pull request may close this issue.
win7以上可考虑如下方式:
The text was updated successfully, but these errors were encountered: