The seventh chapter of simple and Complete: MFC Backbone Program

Source: Internet
Author: User

Only way: Memorize MFC class hierarchies. The main MFC classes used frequently: CWINAPP, Cwnd<-cview, Cwnd<-cframewnd, Cframewnd<-cmdiframewnd, Cframewnd<-cmdichildwnd, Cwnd<-cdialog, Cwnd<-ccontrolbar, Ccontrolbar<-cstatusbar, Ccontrolbar<-ctoolbar, CCmdTarget<- CDocument, Ccmdtarget<-cdoctemplate, Cdoctemplate<-cmultidoctemplate.

Toolbars are the flavors of a hotkey that renders some menu bars in the form of buttons. The so-called status bar is the text area shown below the main window.

In MFC, CDocument can be simply understood as data, CView is the performance of CDocument, is the interface, is responsible for contact with the user, is the interface with users.

Each data is rendered by the performance of the data (CView), and the view needs to be placed in a frame window to be displayed (CMDIChildWnd). These three objects are managed by the so-called document template (CMultiDocTemplate object).

Document is the body of the data, and the view Document,view is the interface that the document displays externally. Document can correspond to multiple view, and view can see all of the document as well as parts. View cannot be displayed directly and must be displayed in the so-called document frame window (CMDIChildWnd object).

Some message handlers need to be customized to handle the corresponding message, while some other message processing functions are standard, using MFC already defined, such as cwinapp::onfilenew, Cwinapp::onfileopen, and so on.

When a document is opened with a menu, when no document is opened using another menu, the menu replaces the work with MFC AutoComplete.

The seventh chapter of simple and Complete: MFC Backbone Program

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.