非客户在航空玻璃窗上绘画

发布于 2024-10-31 22:17:24 字数 811 浏览 1 评论 0原文

现在我正在自定义我的应用程序的标题栏。我的目标是在标题栏上添加一个额外的按钮。我是我的上一个问题 人们向我建议了自定义非客户区域的方法。这一切都很完美,除了一件小事 - 发光!我可以在非客户区域绘制发光的图像,但我无法使其散布到窗口之外。我也找不到关于这个主题的任何资源。

我研究了这个示例并制作了自己的测试应用程序来调查非客户端绘图设施。我的应用程序窗口的屏幕截图:

my app's window

因此,当我的应用程序被剪切时,您可以看到系统按钮在窗口外发光通过边框。

例如,Skype 的窗口在标题栏中有四个自定义按钮,它们可以在窗口框架之外“发光”:

Skype's window

有人可以建议我找出在窗外绘制按钮发光的方法吗?
提前致谢!

[编辑]
谢谢大家的解答!

Now Im customizing title bar of my application. My aim is to add one extra button on title bar. Im my previous question people have adviced me the way I can customize non client area. Thats works perfectly except one small thing - glowing! I can draw glowing in nonclient area but I cannot make it spreads out of the window. I also cant find any resource about this subj.

I looked into this sample and made my own test app for investigating non client drawing facilities. Screen shot of my app's window:

my app's window

So you can see that system button glows out of the windows when my is clipped by borderframe.

For example, Skype's window have four custom buttons in title bar and they can "glow" out of the window frame:

Skype's window

Can anybody advise me to find out the way to draw button's glowing out of the window?
Thanks in advance!

[EDIT]
Thank you everybody for answers!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

病毒体 2024-11-07 22:17:24

Skype 欺骗了它,在他们的窗口顶部有一个小条子;他们可以在哪里画它。

您可以使用 Process Explorer to SpyXX 查看它:

在此处输入图像描述

另请参阅

MSDN:使用 DWM 的自定义窗口框架

Skype cheats it, and has a little sliver along the top of their window; where they can draw it.

You can see it with Process Explorer to SpyXX:

enter image description here

See also

MSDN: Custom Window Frame Using DWM

浪漫之都 2024-11-07 22:17:24

我认为不可能在 NC 区域之外进行绘制,而且我有点怀疑他们是否正在绘制整个 UI 以完全匹配 DWM Aero 效果。

考虑到它的外观,我想知道他们是否使用 CustomBorderForm 的帮助或恢复按钮做了一些技巧,然后“免费”获得 DWM 模糊突出显示效果。

这是我能找到的最相关的文章: http://geekswithblogs.net/kobush/articles /CustomBorderForms3.aspx

后续 - 我认为这个自定义 chrome 线程有更多指向相同技术的指针(尽管目标不同): WinForms 应用程序中的自定义标题栏/chrome

I don't think it's possible to draw beyond your NC area, and I kind of doubt they are drawing the whole UI to exactly match DWM Aero effects.

Given how this looks, I wonder if they did some tricks with either the help or restore button of a CustomBorderForm, which would then get the DWM blur highlight effect "for free".

Here's the most relevant article I could find to this: http://geekswithblogs.net/kobush/articles/CustomBorderForms3.aspx

Followup - I think this custom chrome thread has more pointers to the same techniques (although different goal): Custom titlebars/chrome in a WinForms app

情徒 2024-11-07 22:17:24

AFAIK,这是不可能,因为窗口边框之外的区域根本不属于您

Skype 屏幕截图来自自定义绘制的框架,该框架很可能超出了可见边框,不是来自 Aero Glass 框架。如果你仔细观察,你就能看出区别。

AFAIK, this is not possible, because the area outside your window's border simply does not belong to you.

The Skype screenshot is from a custom-drawn frame that most likely extends a bit beyond the visible borders, not from an Aero Glass frame. You can tell the difference if you look carefully.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文