afx_msg void OnFileOpen( );
Remarks
You must add an
ON_COMMAND( ID_FILE_OPEN, OnFileOpen )
statement to your CWinApp class message map to enable this member function.
If enabled, this function handles execution of the File Open command.
For information on default behavior and guidance on how to override this member function, see Technical Note 22.
Example
// The following message map, produced by AppWizard, binds the
// File New, Open, and Print Setup menu commands to default
// framework implementations of these commands.
BEGIN_MESSAGE_MAP(CMyApp, CWinApp)
//{{AFX_MSG_MAP(CMyApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// 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. You can use
// ClassWizard to bind the commands, as illustrated below, since
// the message map entries are bracketed by //{{AFX_MSG_MAP
// and //}}AFX_MSG_MAP. Note, you can name the handler
// CMyApp::OnFileNew instead of CMyApp::OnMyFileNew, and likewise
// for the other handlers, if desired.
BEGIN_MESSAGE_MAP(CMyApp, CWinApp)
//{{AFX_MSG_MAP(CMyApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
ON_COMMAND(ID_FILE_NEW, OnMyFileNew)
ON_COMMAND(ID_FILE_OPEN, OnMyFileOpen)
ON_COMMAND(ID_FILE_PRINT_SETUP, OnMyFilePrintSetup)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
CWinApp Overview | Class Members | Hierarchy Chart
See Also CWinApp::OnFileNew