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
带阴影的窗口圆角是黑边,有没有好的解决办法啊? ——阴影图片已做了圆角,窗口属性roundcorner和顶层box的属性borderround都已经设置。 去掉阴影是可以圆角的,但是去掉阴影的圆角感觉有锯齿,不够圆滑,不像Windows11的窗口圆角那么圆滑。
The text was updated successfully, but these errors were encountered:
这个要看下你使用的阴影方案是什么类型,是使用层窗口方式还是使用单独窗口阴影的方案。 圆角毛糙的问题的确存在,目前尚未安排计划来优化该问题,如果您有好的优化方案,欢迎发起 PR 一起帮大家优化。
Sorry, something went wrong.
异形窗口可能可以达到你想要的效果: CString strPathImg = _T("c:\1.bmp"); HBITMAP hBitmap = NULL; Gdiplus::Bitmap* image = new Gdiplus::Bitmap(strPathImg); if (NULL != image) { image->GetHBITMAP(NULL, &hBitmap);
if (NULL != hBitmap) { HRGN hRgn = BitmapToRegion(hBitmap, RGB(245, 245, 245), RGB(10, 10, 10)); SetWindowRgn(m_hWnd, hRgn, TRUE); } delete image; DeleteObject(hBitmap); }
这个问题出现的原因是因为AlphaFix的时候造成的,如图所示:
如果愿意修复,可以考虑下这样修复:
但修复之后,需要注意在这个窗口区域内的alpha显示问题,注意不要在这个区域内显示文本,否则可能会是透明的。
效果如下:
No branches or pull requests
问题现象
带阴影的窗口圆角是黑边,有没有好的解决办法啊?
——阴影图片已做了圆角,窗口属性roundcorner和顶层box的属性borderround都已经设置。
去掉阴影是可以圆角的,但是去掉阴影的圆角感觉有锯齿,不够圆滑,不像Windows11的窗口圆角那么圆滑。
预期结果
重现步骤
The text was updated successfully, but these errors were encountered: