如何删除 Visual C++ “展开菜单” 箭?
在 Visual C++ 中创建带有子菜单的菜单时,我发现子菜单以箭头开头,我必须单击该箭头才能展开才能查看其内容。 有没有办法(以编程方式)让子菜单弹出已经展开(没有箭头可单击)?
这是我正在谈论的内容的图像,在单击上述箭头之前和之后: 也在这里
When creating menus with submenus in Visual C++, I find that submenus begin as arrows that I must click to expand to see their contents. Is there a way (programmatically) to have the submenus pop-out already expanded (with no arrow to click)?
Here is an image of what I am talking about, before and after clicking aforementioned arrow:
also here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来您正在使用 MFC 功能包。
转到
CMainFrame::OnCreate()
,你应该能够找到就像是
位于其中的某个位置。
是一个列表,其中包含最初未隐藏的所有菜单项。
只需用您喜欢的项目填充它即可。
您可能还想查看此处提供的示例代码:
C:\Program Files\Microsoft Visual Studio 9.0\Samples\1033
如果您不调用 SetBasicCommands 且不创建列表,则会删除展开按钮。 这使您无需在每次添加新命令时都增强列表。
it seems you are using the MFC Feature Pack.
Go to
CMainFrame::OnCreate()
, you should be able to findsomething like
somewhere inside it.
is a list that holds all the menu items that are not be hidden initially.
Simple populate it with the items you like.
You may also want to check out the samples code available here:
C:\Program Files\Microsoft Visual Studio 9.0\Samples\1033
In case you do not call SetBasicCommands and do not create the list, the expand button is removed. This releases you from enhancing the list everytime you add a new command.