MFC: Xinxin Sun Tutorial 3 notes

Source: Internet
Author: User

Ctestapp How to call the WinMain function:

First Call Ctestapp Theapp;

Call Ctestapp constructor again.

Then call the base class of Ctestapp CWinApp constructor (Appcore.cpp, address C:\Program Files\Microsoft Visual Studio 9.0\vc\ce\atlmfc\src\mfc)

CWinApp constructor called the _tWinMain function in Appmodul.cpp, which is too complex to see.

The _tWinMain function calls the Afxwinmain function (the main function) in Winmain.cpp

Afxwinmain calls Pthread->initinstance (), which is a virtual function that calls the Ctestapp::initinstance () function in Test.cpp

This function calls the Afxenddeferregisterclass function in Wincore.cpp.

CMainFrame in MainFrm.cpp::P Recreatewindow function calls CFrameWnd in Winfrm.cpp::P Recreatewindow function

The Afxdeferregisterclass function in this function is the Afxenddeferregisterclass function.

Winfrm.cpp also calls the CFrameWnd::Create function, which calls the CreateEx function (wincore.cpp)

CreateEx assigning values to window parameters

Cwinthread::run function (thrdcore.cpp) to complete the cyclic dispatch

This class tells the MFC generation mechanism, functions, classes jump to jump to the chaos

MFC: Xinxin Sun Tutorial 3 notes

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.