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