DOC/View/frame relationship series (1)

Source: Internet
Author: User

For a long time, I have not systematically read the 23 design models in one breath, and I will always check them online. I had no time to think about these 23 design models, so I was always unable to understand the MFC framework, and it was really painful. Today, when I was studying mahjong, I established an SDI project, so I roughly studied this framework.

 

 

I have the following experiences:

During the setup of the SDI wizard, vc6.0 did the following for us:

1. New objects include doc, frame, and view.

2. Two windows, frame and view, are created.

3. save the frame object address to the app object, save the doc object address to the view object, and insert the view object address to a table in the doc object, save the view object address to the frame object. runtime_class is used to dynamically create the objects generated by the Wizard. In fact, it is new.

 

 

Here we will post several important class structures. I will extract the essence and paste them here:

 

Class cview: Public cwnd
{
Public:
Cdocument * getdocument () const;

Protected:
Cdocument * m_pdocument;

Friend class cdocument;
Friend class cdoctemplate;

}

 

Class cdocument: Public c0000target

{

Protected:
Cdoctemplate * m_pdoctemplate;
}

 

Too busy. First paste the cview and the relevant cdocument section, and write the other sections of DOC/View/frame later.

 

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.