VC++ Programming UESTC Chapter 12 Menus, Keyboard Accelerators, the rich Edit Control and Property sheets e In this section, we 'll talk a little bit of the document-view architecture e Learn to create and use menus and keyboard accelerators e Talk about command message handling in two dimensions o Use rich edit control for text editing o Use property sheet for setting edit options
VC++ Programming @ UESTC 1 Chapter 12 Menus, Keyboard Accelerators, the RichEdit Control and Property Sheets ⚫ In this section, we’ll talk a little bit of the document-view architecture ⚫ Learn to create and use menus and keyboard accelerators. ⚫ Talk about command message handling in two dimensions. ⚫ Use rich edit control for text editing. ⚫ Use property sheet for setting edit options
VC++ Programming UESTC Chapter 12 Menus, Keyboard Accelerators, the rich Edit Control and Property sheets Class goals as the followings Understand document-view architecture and know how the document main frame window. view window. toolbar window. status bar window and menu talk to each other 2. Know how to make windows menu and floating pop-up menu 3. Use resource editor to add keyboard accelerators 4. Understand command routing system and command message handling 5. Use rich edit control to play with text fonts, etc 6. Know the usage of property sheets including the DDX
VC++ Programming @ UESTC 2 ⚫ Class Goals as the followings: 1. Understand document-view architecture and know how the document,main frame window, view window, toolbar window, status bar window and menu talk to each other. 2. Know how to make windows menu and floating pop-up menu. 3. Use resource editor to add keyboard accelerators. 4. Understand command routing system and command message handling. 5. Use rich edit control to play with text fonts,etc. 6. Know the usage of property sheets including the DDX. Chapter 12 Menus, Keyboard Accelerators, the RichEdit Control and Property Sheets
VC++ Programming@UESTC Chapter 12 Menus, Keyboard Accelerators, the rich Edit Control and Property sheets Window structure Title Bar Menu bar oolbar window SDI Child View window Main wIndows Frame window Status bar window 3
VC++ Programming @ UESTC 3 Window Structure Title Bar Menu Bar Toolbar window View window Status bar window SDI Main Frame window Child windows Chapter 12 Menus, Keyboard Accelerators, the RichEdit Control and Property Sheets
VC++ Programming UESTC Chapter 12 Menus, Keyboard Accelerators, the rich Edit Control and Property sheets DOCUMENT-VIEW architecture The view window is just a child window inside the client area of the main frame window which is the window we ordinarily talk about o The title bar and menu bar belongs to the main frame window e The view window. the toolbar window and status bar window are inside the client area of the main frame window o The application framework provides a sophisticated routing system for the command messages
VC++ Programming @ UESTC 4 DOCUMENT-VIEW architecture The view window is just a child window inside the client area of the main frame window which is the window we ordinarily talk about. ⚫ The title bar and menu bar belongs to the main frame window. ⚫ The view window, the toolbar window and status bar window are inside the client area of the main frame window. ⚫ The application framework provides a sophisticated routing system for the command messages. . Chapter 12 Menus, Keyboard Accelerators, the RichEdit Control and Property Sheets
VC++ Programming@UESTC Chapter 12 Menus, Keyboard Accelerators, the rich Edit Control and Property sheets Document is the content of our application and the view is how we look at it For instance document is just like data in excel file and the views like different chart tables(row chart, Column chart, Pivot Chart, etc) based on that same data o The view's inherited GetDocument member function returns a pointer to the document object o The key is to separate data from how we look at them. It adds another layer in the ood world for easy organizing our work
VC++ Programming @ UESTC 5 ⚫ Document is the content of our application and the view is how we look at it. For instance, document is just like data in excel file and the views like different chart tables(Row chart, Column chart,PivotChart,etc) based on that same data. ⚫ The view’s inherited GetDocument member function returns a pointer to the document object. ⚫ The key is to separate data from how we look at them. It adds another layer in the OOD world for easy organizing our work. Chapter 12 Menus, Keyboard Accelerators, the RichEdit Control and Property Sheets