Home > Software engineering >  How to change in a MFC single document file CWinApp: : OnFileOpen function
How to change in a MFC single document file CWinApp: : OnFileOpen function

Time:10-02

Reach a MFC single document application recently, is to interpret, run the program, selection in the main menu and click on "file" - & gt;" New "this sub menu item, the program will automatically pop up a custom dialog box for the subsequent operations, I'll call this" new "option ClassWizzad, not in any program found in existing classes associated with the command or UPDATE_COMMAND_UI function, this option with ID" ID_FILE_NEW "(to create a single document MFC APPWIZARD application as the default ID), after the search, found in the main program. The CPP file, there is a" ON_COMMAND (ID_FILE_NEW OnFileNew). "
Source program

The new program corresponding to the position of the default function


Which correspond to the corresponding position of the new program for "ON_COMMAND (ID_FILE_OPEN CWinApp: : OnFileOpen)", this shows that the original author in some way changed the corresponding function of the options here, but I can't search within their own program to "OnFileNew" the function of the source code, excuse me is there any way to see the original author of OnFileNew the definition of this function, I first want to modify the author to write code that pop up my own design dialog,

CodePudding user response:

ON_COMMAND (ID_FILE_OPEN, CWinApp : : OnFileOpen)
Red is the default processing in WinApp
You can in your doc
Afx_msg void OnFileOpen ();
//
ON_COMMAND (ID_FILE_OPEN OnFileOpen)
Doc is defined in the
Void CxxxxDoc: : OnFileOpen () {,,,,,,}

CodePudding user response:

Vc assistant to highlight, how may not search,
Unless it's engineering didn't add files come in, or you search criteria set wrong,
  • Related