共用方式為


IAgentCommandEx::SetVoiceCaption

[從 Windows 7 開始,Microsoft Agent 已被取代,而且在後續版本的 Windows 中可能無法使用。]

HRESULT SetVoiceCaption(
   BSTR bszVoiceCaption  // voice caption text
);

設定針對命令顯示的VoiceCaption文字。

  • 傳回S_OK,表示作業成功。

bszVoiceCaption

BSTR,指定CommandVoiceCaption屬性的文字。

如果您在 Commands 集合中定義 Command 物件並設定其 Voice 屬性,您通常也會設定其 VoiceCaption 屬性。 當您的用戶端應用程式為使用中輸入時,此文字會出現在 [語音命令] 視窗中。 如果未設定此屬性, Caption 屬性的設定會決定顯示的文字。 當 未設定 VoiceCaption 或 屬性時,命令不會出現在 [語音命令] 視窗中。

Caption

另請參閱

IAgentCommand::GetCaptionIAgentCommand::SetEnabledIAgentCommand::SetVisibleIAgentCommand::SetVoiceIAgentCommandsEx::AddExIAgentCommandsEx::InsertExIAgentCommands::AddIAgentCommands::Insert