共用方式為


CWinApp::EnableShellOpen

並且按兩下檔案從 Windows 檔案管理員的內部時,呼叫這個函式,一般是從您的 InitInstance 覆寫,啟用應用程式的使用者至資料檔案。

void EnableShellOpen( );

備註

使用這個函式 RegisterShellFileTypes 一起呼叫成員函式或提供 .REG 檔案會根據您對檔案類型的手動登錄的應用程式。

範例

// The following code fragment is from CMyApp::InitInstance.
// CMyApp is a CWinApp-derived class.

// enable file manager drag/drop and DDE Execute open
EnableShellOpen();
RegisterShellFileTypes();

需求

Header: afxwin.h

請參閱

參考

CWinApp 類別

階層架構圖

CWinApp::OnDDECommand

CWinApp::RegisterShellFileTypes