IAgentCommands::Add
[Microsoft 代理程式在 Windows 7 中已被取代,且在後續版本的 Windows 中可能無法使用。]
HRESULT Add(
BSTR bszCaption, // Caption setting for Command
BSTR bszVoice, // Voice setting for Command
long bEnabled, // Enabled setting for Command
long bVisible, // Visible setting for Command
long * pdwID // address for variable for ID
);
將 Command 新增至Commands集合。
- 傳回S_OK,表示作業成功。
-
bszCaption
-
BSTR,指定Commands集合中針對 Command所顯示的Caption文字值。
-
bszVoice
-
bEnabled
-
布林運算式,指定Commands集合中Command的Enabled設定。 如果參數為 True,則會啟用 命令 ,而且可以選取;如果 為 False, 則會停用命令 。
-
bVisible
-
布林運算式,指定Commands集合中Command的Visible設定。 如果參數為True,則如果Caption屬性也設定) ,則命令會顯示在字元的快顯視窗中 (。
-
pdwID
-
接收已新增 命令識別碼的變數位址。
另請參閱
IAgentCommand::SetCaption、 IAgentCommand::SetEnabled、 IAgentCommand::SetVisible、 IAgentCommand::SetVoice、 IAgentCommands::Insert、 IAgentCommands::Remove、 IAgentCommands::RemoveAll
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應