Modifier

Partager via


IAgentCommand::SetEnabled

[Microsoft Agent is deprecated as of Windows 7, and may be unavailable in subsequent versions of Windows.]

HRESULT SetEnabled(
   long bEnabled  // Enabled setting for Command
);

Sets the Enabled property for a Command.

  • Returns S_OK to indicate the operation was successful.

bEnabled

A Boolean value that sets the value of the Enabled setting of a Command. True enables the Command; False disables it. A disabled Command cannot be selected.

A Command must have its Enabled property set to True to be selectable. It also must have its Caption property set and its Visible property set to True to appear in the character's pop-up menu. To make the Command appear in the Voice Commands Window, you must set its Voiceproperty.

See Also

IAgentCommand::GetCaption, IAgentCommand::SetVoice, IAgentCommands::Add, IAgentCommands::Insert