IExecuteCommand 介面 (shobjidl_core.h)

公開方法,這些方法會設定與命令動詞相關的指定狀態或參數,以及叫用該動詞的方法。

繼承

IExecuteCommand 介面繼承自 IUnknown 介面。 IExecuteCommand 也有下列類型的成員:

方法

IExecuteCommand 介面具有這些方法。

 
IExecuteCommand::Execute

在選取的專案上叫用動詞。 呼叫這個介面的其他方法之後,請呼叫這個方法。
IExecuteCommand::SetDirectory

設定新的工作目錄。
IExecuteCommand::SetKeyState

根據按鍵 CTRL 和 SHIFT 的目前狀態設定值。
IExecuteCommand::SetNoShowUI

指出是否應該顯示與選取的Shell專案相關聯的任何UI。
IExecuteCommand::SetParameters

提供動詞的參數值。
IExecuteCommand::SetPosition

設定用於顯示之點的座標。
IExecuteCommand::SetShowWindow

設定指定的視窗視覺狀態。

備註

實作時機

當您選擇它做為方法時,實作這個介面,以叫用動詞,以對選取的專案執行動作。 專案會透過 IObjectWithSelection::SetSelection 傳遞為 Shell 項目陣列,因此對象也必須實 作 IObjectWithSelection

使用時機

請勿直接呼叫 IExecuteCommand 的方法。 當使用者想要對專案執行動作時,Windows 檔案總管會呼叫 您的 IExecuteCommand 方法。

請注意,除了 Execute 之外,這個介面的方法會將系統資訊傳遞至處理程式。 系統本身會呼叫這些方法,並根據系統設定和條件適當地設定參數。

規格需求

需求
最低支援的用戶端 Windows 7 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2008 R2 [僅限傳統型應用程式]
目標平台 Windows
標頭 shobjidl_core.h (包括 Shobjidl.h)