我的菜单栏下面有一行!
当您创建菜单栏时,下面会出现一条有趣的线(至少对于 XP 和 Win7 而言)。我怎样才能摆脱这条线?我知道一些应用程序,例如 Firefox 和 Thunderbird,已经这样做了。
这是一个例子:
我正在使用 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:
I am programming in C, using the Windows API. My menu is loaded from a resource file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想说,这条线应该在那里(运行一个简单的应用程序,如 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)