Share via


The Frame-Window Classes Created by AppWizard

OverviewHow Do ITutorial

When you use AppWizard to create a skeleton application, in addition to application, document, and view classes, AppWizard creates a derived frame-window class for your application’s main frame window. The class is called CMainFrame by default, and the files that contain it are named MAINFRM.H and MAINFRM.CPP.

If your application is SDI, your CMainFrame class is derived from class CFrameWnd. If your application is MDI, CMainFrame is derived from class CMDIFrameWnd. If you choose to support a toolbar, the class also has member variables of type and and an OnCreate message-handler function to initialize the two control bars.

If your application is MDI, AppWizard does not derive a new document frame-window class for you. Instead, it uses the default implementation in CMDIChildWnd. Later on, if you need to customize your document frame window, you can use ClassWizard to create a new document frame-window class.

These frame-window classes work as created, but to enhance their functionality, you must add member variables and member functions. You may also want to have your window classes handle other Windows messages.