次の方法で共有


IAgentCommandsEx::AddEx

[Microsoft エージェントは Windows 7 の時点で非推奨となり、以降のバージョンの Windows では使用できない場合があります。]

HRESULT AddEx(
   BSTR bszCaption,       // Caption setting for Command
   BSTR bszVoice,         // Voice setting for Command
   BSTR bszVoiceCaption,  // VoiceCaption setting for Command
   long bEnabled,         // Enabled setting for Command
   long bVisible,         // Visible setting for Command
   long ulHelpID,         // HelpContextID setting for Command
   long * pdwID           // address for variable for ID
);

Command コレクションに Command を追加します

  • 操作が成功したことを示すS_OKを返します。

bszCaption

Command コレクション内の Command に対して表示される Caption テキストの値を指定する BSTR。

bszVoice

Commands コレクション内の Command音声テキスト設定の値を指定する BSTR。

bszVoiceCaption

Command コレクション内の Command に対して表示される VoiceCaption テキストの値を指定する BSTR。

bEnabled

Commands コレクション内の CommandEnabled 設定を指定するブール式。 パラメーターが True の場合、 Command は有効になり、選択できます。 False の場合、 コマンド は無効になります。

bVisible

Commands コレクション内の CommandVisible 設定を指定するブール式。 パラメーターが True の場合、 Command は文字のポップアップ メニューに表示されます ( Caption プロパティも設定されている場合)。

ulHelpID

Command オブジェクトに関連付けられているヘルプ トピックのコンテキスト番号。コマンドの状況依存のヘルプを提供するために使用されます。

pdwID

追加された Command の ID を受け取る変数のアドレス。

IAgentCommandsEx::AddEx、HelpContextID プロパティを含めることで IAgentCommands::Add を拡張します。 プロパティは、IAgentCommandsEx::SetHelpContextID を使用して設定することもできます。

参照

IAgentCommands::AddIAgentCommandsEx::SetHelpContextIDIAgentCommand::SetCaptionIAgentCommand::SetEnabledIAgentCommand::SetVisibleIAgentCommand::SetVoiceIAgentCommands::InsertIAgentCommandsEx::InsertExIAgentCommands::RemoveIAgentCommands::RemoveAllabled