Home > Software engineering >  Can't find the entrance to the MFC engineering function
Can't find the entrance to the MFC engineering function

Time:11-02

This is the main source code, c + + commonly engineering are the main entrance or winmain function, but this project can't find

//FPGASerialController. CPP: Defines the class behaviors for the application. The
//

# include "stdafx. H"
# include "FPGASerialController. H"
# include "FPGASerialControllerDlg. H"

# ifdef _DEBUG
# define new DEBUG_NEW
# endif


//CFPGASerialControllerApp

BEGIN_MESSAGE_MAP (CFPGASerialControllerApp CWinApp)
ON_COMMAND (ID_HELP, & amp; CWinApp: : OnHelp)
END_MESSAGE_MAP ()


//CFPGASerialControllerApp construction

CFPGASerialControllerApp: : CFPGASerialControllerApp ()
{
//TODO: add construction code here,
//Place all significant initialization in InitInstance
}


//The one and only CFPGASerialControllerApp object

CFPGASerialControllerApp theApp;


//CFPGASerialControllerApp initialization

BOOL CFPGASerialControllerApp: : InitInstance ()
{
//InitCommonControlsEx () is required on Windows XP if an application
//the manifest specifies the use of ComCtl32. DLL version 6 or later to enable
//visual styles. Otherwise, any window creation will fail.
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls. DwSize=sizeof (InitCtrls);
//Set this to include all the common control classes you want to use the
//in your application. The
InitCtrls. DwICC=ICC_WIN95_CLASSES;
InitCommonControlsEx (& amp; InitCtrls);

CWinApp: : InitInstance ();

AfxEnableControlContainer ();

//Standard initialization
//If you are not using these features and wish to reduce the size
//of your final executable, you should remove the from the following
//the specific initialization routines you do not need
//Change the registry key under which our Settings are stored in the
//TODO: You should modify this string to be something appropriate
//to the as the name of your company or organization
SetRegistryKey (_T (" Local AppWizard - Generated Applications "));

CFPGASerialControllerDlg DLG.
M_pMainWnd=& amp; DLG.
INT_PTR nResponse=DLG. DoModal ();
If (nResponse==IDOK)
{
//TODO: Place code here to handle the when the dialog is
//dismissed with OK
}
Else if (nResponse==IDCANCEL)
{
//TODO: Place code here to handle the when the dialog is
//dismissed with Cancel
}

//Since the dialog has had been closed, the return FALSE so that we exit the
//application, rather than start the application 's message pump.
return FALSE;
}

CodePudding user response:

MFC library encapsulates many basic function
Set a breakpoint in the InitInstance function, F5 to run to stop, see the call stack, will know the level of the call, double-click can also see the source code

CodePudding user response:

MFC already encapsulation, do you have an App as an example, the InitInstance it is you can begin to execute code entry

CodePudding user response:

http://blog.csdn.net/gencheng/article/details/12676021
  • Related