Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.36 KB

mfc-support-in-atl-projects.md

File metadata and controls

50 lines (37 loc) · 1.36 KB
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
vc.atl.addmfc
ATL projects, MFC support
f90b4276-cb98-4c11-902c-9ebcfe6f954b

MFC Support in ATL Projects

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.

See also

Adding a Class
Creating an ATL Project
Default ATL Project Configurations