共用方式為


IAgentCommands::SetCaption

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

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

設定 命令 集合所顯示的 Caption 文字。

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

bszCaption

BSTR,指定 Commands 集合之 Caption 屬性的值。

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

如果您為已設定 Caption 集合的 Commands 集合定義命令,您通常也會為其 Commands 集合定義 Caption

另請參閱

IAgentCommands::GetCaptionIAgentCommands::SetVisibleIAgentCommands::SetVoice