IAgentCommands::SetCaption

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

HRESULT SetCaption(
   BSTR bszCaption  // Caption setting for Commands collection
);

Sets the Caption text displayed for a Commands collection.

  • Returns S_OK to indicate the operation was successful.

bszCaption

A BSTR that specifies the value for the Caption property for a Commands collection.

Setting the Caption property for a Commands collection defines how it will appear on the character's pop-up menu when its Visible property is set to True and your application is not the input-active client. To specify an access key (unlined mnemonic) for your Caption, include an ampersand (&) character before that character.

If you define commands for a Commands collection that has its Caption set, you typically also define a Caption for its Commands collection.

See Also

IAgentCommands::GetCaption, IAgentCommands::SetVisible, IAgentCommands::SetVoice