[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
);
- 傳回S_OK,表示作業成功。
-
bszCaption
-
bszVoice
-
bEnabled
-
布爾表達式,指定 Commands 集合中 CommandEnabled 設定。 如果 參數 True,則會啟用 Command,而且可以選取;如果 False,則會停用 命令。
-
bVisible
-
布爾表達式,指定 Commands 集合中 Command 的 Visible 設定。 如果參數 True,則 命令 會顯示在字元的彈出視窗中(如果也會設定 Caption 属性)。
-
pdwID
-
接收已新增命令 命令標識碼之變數的位址。
另請參閱
IAgentCommand::SetCaption、IAgentCommand::SetEnabled、IAgentCommand::SetVisible、IAgentCommand ::SetVoice、IAgentCommands::Insert、IAgentCommands::Remove、IAgentCommands::RemoveAll