IAgentCommands::Add
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
);
Adds a Command to a Commands collection.
- Returns S_OK to indicate the operation was successful.
- bszCaption
- A BSTR that specifies the value of the Caption text displayed for a Command in a Commands collection.
- bszVoice
- A BSTR that specifies the value of the Voice text setting for a Command in a Commands collection.
- bEnabled
- A Boolean expression that specifies the Enabled setting for a Command in a Commands collection. If the parameter is True, the Command is enabled and can be selected; if False, the Command is disabled.
- bVisible
- A Boolean expression that specifies the Visible setting for a Command in a Commands collection. If the parameter is True, the Command will be visible in the character's pop-up menu (if the Caption property is also set).
- pdwID
- Address of a variable that receives the ID for the added Command.
See Also
IAgentCommand::SetCaption, IAgentCommand::SetEnabled, IAgentCommand::SetVisible, IAgentCommand::SetVoice, IAgentCommands::Insert, IAgentCommands::Remove, IAgentCommands::RemoveAll