Cheetah MFC1 First window CWinApp CFrameWnd InitInstance message map Cpaint CRect Create

Source: Internet
Author: User
MFC uses the C + + language to wrap Windows SDK API functions into hundreds of classes two important MFC classes: CWinApp and Cframewnd1.mfc project empty project properties static library or shared MFC Unicode Character Set
Contains the MFC header files AFXWIN.h: MyApp inherits CWinApp. Override the InitInstance () function. The header files are as follows:
CPP files only Create objects:

or write it all in one file:
or method Three:
The =========================== message map =================================CPAINTDC class and CRect class Declear_message_map () are the message map declarations. CMainWindow:: The This->creat () function in the function can also add parameters, ws_overlappedwindow| Ws_vscroll, CRect (100,100,380,300)//scroll bar, window size
Header files for two message maps:
Begin_message_map () on_wm_paint ();//The message corresponds to the afx_msg void Onpaint () message handler function in the header file; On_wm_lbuttondown ();//mouse false press the message corresponds to AFX_  msg void OnLButtonDown (UINT nflags,cpoint point); and need to implement this function in an early CPP file End_message_map () above three or four behavior message map
Two message maps correspond to two message handler functions:

From for notes (Wiz)

Cheetah MFC1 First window CWinApp CFrameWnd InitInstance message map Cpaint CRect Create

Related Article

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: 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.