加载项:如何使用VC ++将菜单项添加到Visual Studio 6.0 IDE中? [英] Add-In: How to add a menu item into Visual Studio 6.0 IDE using VC++?

查看:104
本文介绍了加载项:如何使用VC ++将菜单项添加到Visual Studio 6.0 IDE中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从Visual C ++开发的加载项中将菜单项添加到Visual Studio 6.0 IDE中?可能吗?

How can I add a menu item into Visual Studio 6.0 IDE from an Add-In developed in Visual C++? Is it possible at all?


当我使用加载项"向导创建一个简单的加载项时,它会添加一个工具栏按钮,而不是一个菜单项.
我只找到了与.NET(C#和VB)以及更高版本VS相关的示例和文章.

感谢您的帮助.


When I create a simple addin using the Add-In wizard it adds a tool bar button, but not a menu item.
I found only examples and articles related to .NET (C# and VB) and higher versions of VS.

I appreciate your help.

推荐答案

您可以使用与添加工具栏项的代码相同的方式来进行操作,我假设它正在使用DTE?  唯一的区别是您进入表示要添加到菜单的CommandBarControl的方式.  向导代码可能使用类似的

You can do it the same way as the code that adds a toolbar item, I assume it is using DTE?  The only difference is in how you get to the CommandBarControl that represents the menu you want to add to.  The wizard code probably uses something like

DTE.CommandBars [标准"]

DTE.CommandBars["Standard"]

如果你说

DTE.CommandBars ["MenuBar"]

DTE.CommandBars["MenuBar"]

您将获得主菜单,从那里可以使用Controls集合找到要添加到的特定菜单.

you would get the main menu, from there you can use the Controls collection to find the specific menu you want to add to.

Ryan


这篇关于加载项:如何使用VC ++将菜单项添加到Visual Studio 6.0 IDE中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆