Tutorials
|
|
Menu of tutorialsTutorial 1: The Simplest Window
Tutorial 5: Wrapping a Frame around our Scribble ApplicationThis is the code we use to produce a simple frame application. We
inherit a class called CMainFrame::CMainFrame() { // Set m_view as the view window of the frame. SetView(m_view); } The BOOL CMainFrame::OnCommand(WPARAM wparam, LPARAM lparam) { UNREFERENCED_PARAMETER(lparam); // Process the messages from the menu and toolbar. switch (LOWORD(wparam)) { case IDM_FILE_NEW: return OnFileNew(); case IDM_FILE_OPEN: return OnFileOpen(); case IDM_FILE_SAVE: return OnFileSave(); case IDM_FILE_SAVEAS: return OnFileSaveAs(); case IDM_FILE_PRINT: return OnFilePrint(); case IDW_VIEW_STATUSBAR: return OnViewStatusBar(); case IDW_VIEW_TOOLBAR: return OnViewToolBar(); case IDM_HELP_ABOUT: return OnHelp(); case IDM_FILE_EXIT: return OnFileExit(); } return FALSE; } The source code for this tutorial is located within the Tutorial folder of the software available from SourceForge at http://sourceforge.net/projects/win32-framework. |