description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|
Learn more about: MFC Support in ATL Projects |
MFC Support in ATL Projects |
11/04/2016 |
|
|
f90b4276-cb98-4c11-902c-9ebcfe6f954b |
If you select Support MFC in the ATL Project Wizard, your project declares the application as an MFC application object (class). The project initializes the MFC library and instantiates a class (class ProjName) that is derived from CWinApp.
This option is available for nonattributed ATL DLL projects only.
class CProjNameApp : public CWinApp
{
public:
// Overrides
virtual BOOL InitInstance();
virtual int ExitInstance();
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CProjNameApp, CWinApp)
END_MESSAGE_MAP()
CProjNameApp theApp;
BOOL CProjNameApp::InitInstance()
{
return CWinApp::InitInstance();
}
int CProjNameApp::ExitInstance()
{
return CWinApp::ExitInstance();
}
You can view the application object class and its InitInstance
and ExitInstance
functions in Class View.
Adding a Class
Creating an ATL Project
Default ATL Project Configurations