共用方式為


IAgentCommand::SetEnabled

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

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

設定 CommandEnabled 屬性。

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

bEnabled

布爾值,設定 CommandEnabled 設定的值。 True 會啟用 命令;False 會停用它。 無法選取停用 命令

命令 必須將其 Enabled 屬性設定為 True 才能選取。 它也必須設定其 Caption 屬性,且其 Visible 屬性設定為 True,才能出現在字元的快捷功能表中。 若要讓 命令 出現在 Voice Commands Window中,您必須設定其 Voice屬性。

另請參閱

IAgentCommand::GetCaptionIAgentCommand::SetVoiceIAgentCommands::AddIAgentCommands::Insert