win32 sdk:如何使子窗口的标题/边框透明

发布于 2024-09-04 03:52:52 字数 482 浏览 0 评论 0原文

在我的 win32 应用程序中,我想在主窗口中创建一个子窗口。我在调用 CreateWindowEx 时将这些样式分配给子窗口:

WS_CHILDWINDOW | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_SIZEBOX | WS_CAPTION

我得到的子窗口有一个标题和一个可调整大小的边框。 但是,标题中没有关闭按钮,并且子窗口的标题/边框不透明(我在 Windows 7 中使用 aero 主题)。

这是屏幕快照:

替代文本http://img2。 pict.com/f7/c6/2c/3570867/0/e68d95e88eb7.png

如何在标题中添加关闭按钮?如何使标题/边框透明?

In my win32 application I want to create a child window within the main window. I assigned these styles to the child window when calling CreateWindowEx:

WS_CHILDWINDOW | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_SIZEBOX | WS_CAPTION

The child window I get has a caption and a resizable border.
However there's no close button in the caption, and the caption/border of the child window is not transparent (I'm using the aero theme in windows 7).

Here is the screen snap:

alt text http://img2.pict.com/f7/c6/2c/3570867/0/e68d95e88eb7.png

How to add close button to the caption? How can I make the caption/border transparent?

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

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

发布评论

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

评论(1

夜清冷一曲。 2024-09-11 03:52:52

要在标题中获取关闭按钮,您需要添加 WS_SYSMENU 样式。作为子窗口,您的窗口不会具有透明效果,您需要使用 WS_POPUP 来实现。

To get the close button in the caption you will need to add the WS_SYSMENU style. As a child window your window will not have the transparency effect, you will need to use WS_POPUP for that.

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