다음을 통해 공유


CWinApp::OnFileOpen

구현 된 ID_FILE_OPEN 명령입니다.

afx_msg void OnFileOpen( );

설명

추가 해야는 ON_COMMAND( ID_FILE_OPEN, OnFileOpen ) 문을 사용 하 여 사용자 CWinApp 클래스 메시지 맵이 멤버 함수를 사용 합니다.사용 하는 경우이 함수는 파일 열기 명령 실행을 처리 합니다.

기본 동작에 대 한 정보 및이 멤버 함수를 재정의 하는 방법에 대 한 지침을 참조 하십시오. 기술 노트 22.

예제

// The following message map, produced by the Application Wizard, binds 
// the File New, Open, and Print Setup menu commands to default
// framework implementations of these commands.
BEGIN_MESSAGE_MAP(CStdApp, CWinApp)
   // Standard file based document commands
   ON_COMMAND(ID_FILE_NEW, &CWinApp::OnFileNew)
   ON_COMMAND(ID_FILE_OPEN, &CWinApp::OnFileOpen)
   // Standard print setup command
   ON_COMMAND(ID_FILE_PRINT_SETUP, &CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
// The following message map illustrates how to rebind the
// File New, Open and Print Setup menu commands to handlers that
// you implement in your CWinApp-derived class.  
// Note, you can name the handler CCustomApp::OnFileNew instead of
// CCustomApp::OnMyFileNew, and likewise for the other handlers, if desired.
BEGIN_MESSAGE_MAP(CCustomApp, CWinApp)
   ON_COMMAND(ID_FILE_NEW, &CCustomApp::OnMyFileNew)
   ON_COMMAND(ID_FILE_OPEN, &CCustomApp::OnMyFileOpen)
   ON_COMMAND(ID_FILE_PRINT_SETUP, &CCustomApp::OnMyFilePrintSetup)
END_MESSAGE_MAP()

요구 사항

헤더: afxwin.h

참고 항목

참조

CWinApp 클래스

계층 구조 차트

CWinApp::OnFileNew