Visual Studio 用の簡単なアドインを作成します。アドインには次の 2 つのコマンドが含まれています。
command1 = commands.AddNamedCommand2(_addInInstance, "AAAA", "AAAA", "Executes the command for MyAddin2" ,true, 59, ref contextGUIDS, (int)vsCommandStatus.vsCommandStatusSupported+(int)vsCommandStatus.vsCommandStatusEnabled, (int)vsCommandStyle.vsCommandStylePictAndText, vsCommandControlType.vsCommandControlTypeButton);
command2 = commands.AddNamedCommand2(_addInInstance, "BBBB", "BBBB", "Executes the command for MyAddin2", true, 59, ref contextGUIDS, (int)vsCommandStatus.vsCommandStatusSupported, (int)vsCommandStyle.vsCommandStyleText, vsCommandControlType.vsCommandControlTypeButton);
アドインを実行すると、これら 2 つのボタンが Visual Studio の [ツール] タブの下に表示されます。それらを標準のツールバーに表示したい。手動では、[ツール] -> [カスタマイズ] -> [コマンド] タブ -> [コマンドの追加] -> [アドイン] を選択してから、2 つのボタンを選択します。プログラムでそれを行うことはできますか?どんな助けでも大歓迎です。