用DWM阴影边框少窗口? [英] Border less window with DWM shadow?

查看:107
本文介绍了用DWM阴影边框少窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建没有边框和标题栏的窗口。所以默认阴影也不会来,但是我需要阴影所以我使用了DWM阴影。



我处理了"WM_NCCALCSIZE"这条消息来删除边框和标题栏。

我正在使用此电话获取影子&b;


    const MARGINS shadow_on = {1,1,1,1};



    DwmExtendFrameIntoClientArea(hwnd,& shadow_on);
$


这里`DwmExtendFrameIntoClientArea`这个调用会将1个像素帧扩展到客户区。所以在我的窗口中,我能够看到四边的1像素线。在'WM_NCPAINT`中隐藏该行我在四边用系统颜色绘制一条像素线,但是这条线
没有正确绘制。在角落里没有绘制。但它的工作正常与win8

请解决任何问题。

http://stackoverflow.com/questions/16765561/borderless-window-using-areo-snap-shadow-最小化 - 动画和摇动

我认为它会对你有帮助。



这个图像看到角落,我的系统颜色是粉红色所以1像素边框我用系统颜色(粉红色)绘制但在边界不是
正确绘制。我们可以看到一些白色线。但是在Windows 8中工作正常。

I am creating window without border and title bar. so default shadow will also won't come but I need shadow so I used DWM shadow.

I handled `WM_NCCALCSIZE` this message to remove border and title bar.
I am using this call to get the shadow 

    const MARGINS shadow_on = {1,1,1,1};

    DwmExtendFrameIntoClientArea(hwnd,&shadow_on);

Here `DwmExtendFrameIntoClientArea` this call will extend 1 pixel frame into client area. so in my window I am able to see 1 pixel line on four side. to hide that line in `WM_NCPAINT` I am drawing one pixel line on four side with system color but this line is not getting draw properly.In the corner its not drawn. but its working fine with win8
please any solution.
http://stackoverflow.com/questions/16765561/borderless-window-using-areo-snap-shadow-minimize-animation-and-shake
I think it will help you.

n this image see corner,My system color is pink so 1 pixel border i'am drawing with system color(pink) but in corner that border not drawn properly. some white color line we can able to see. but in windows 8 its working fine.

推荐答案

这个
http://social.msdn.microsoft.com/Forums/en-US/home?forum=windowsuidevelopment
 是一个很好的问的地方!
This http://social.msdn.microsoft.com/Forums/en-US/home?forum=windowsuidevelopment is a good place to ask!


这篇关于用DWM阴影边框少窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆