共用方式為


IAgentCommand::SetCaption

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

HRESULT SetCaption(
   BSTR bszCaption  // Caption setting for Command
);

設定 Command所顯示的 Caption 文字。

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

bszCaption

BSTR,指定 CommandCaption 屬性的文字。

設定 CommandCaption 屬性,會定義當字元的 Visible 屬性設定為 True,且您的應用程式不是輸入作用中用戶端時,它會顯示在字元的彈出視窗中的方式。 若要指定您 Caption的訪問鍵(未加上注音鍵),請在該字元之前包含 ampersand (&) 字元。 若要使其可選取,其 Enabled 屬性必須設定為 true

另請參閱

IAgentCommand::GetCaptionIAgentCommand::SetEnabledIAgentCommand::SetVisibleIAgentCommand::SetVoiceIAgentCommands::AddIAgentCommands::Insert