我的菜单栏下面有一行!

发布于 2024-09-03 14:02:14 字数 232 浏览 2 评论 0原文

当您创建菜单栏时,下面会出现一条有趣的线(至少对于 XP 和 Win7 而言)。我怎样才能摆脱这条线?我知道一些应用程序,例如 Firefox 和 Thunderbird,已经这样做了。

这是一个例子:

alt text

我正在使用 Windows API 用 C 进行编程。我的菜单是从资源文件加载的。

When you create a menu bar, a funny line appears underneath (for XP and Win7 at least). How can I get rid of this line? I know that some applications, such as Firefox and Thunderbird, have done so.

Here's an illustration:

alt text

I am programming in C, using the Windows API. My menu is loaded from a resource file.

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

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

发布评论

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

评论(1

一个人的旅程 2024-09-10 14:02:14

我想说,这条线应该在那里(运行一个简单的应用程序,如 calc 并查看)如果您在 XP 中查看像 Explorer(或 IE4-6)这样的应用程序,它的菜单实际上是钢筋内的工具栏。

如果您查看像 GetMenuBarInfo() 这样的函数,您会发现没有可以查询或设置的边框属性。

如果 1 像素线那么重要,您可能必须 A) 在菜单上进行一些所有者绘图以在该线上绘制,或者 B) 实现自定义菜单控件(MS 甚至有一个 IE/Explorer 样式菜单教程)

I'd say that line is supposed to be there (Run a simple application like calc and see) If you look at an application like Explorer (Or IE4-6) in XP, its menu is actually a toolbar inside of a rebar.

If you look at a function like GetMenuBarInfo() you will see there is no border property you can query or set.

If a 1 pixel line is that important, you probably have to A) Do some owner drawing on the menu to paint over that line or B) Implement a custom menu control (MS even has a tutorial for IE/Explorer style menus)

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