U E D R , A S I H C RSS

5인용C++스터디/API에서MFC로

MFC???

  • Microsoft Foundation Class library
  • MS .

  • - CWinApp
  • - CWnd
  • - CDialog
  • DC - CDC
  • 펜 - CPen
  • - CBrush
  • - CBitmap
  • - CMenu
  • - CButton
  • - CEdit

~cpp 
BEGIN_MESSAGE_MAP(CApplicationView, CView)
	//{{AFX_MSG_MAP(CApplicationView)
	ON_WM_LBUTTONDOWN()
	ON_WM_LBUTTONUP()
	ON_WM_KEYDOWN()
	ON_WM_KEYUP()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
~cpp 
class CApplicationView : public CView
{
	.
	.
	.

// Generated message map functions
protected:
	//{{AFX_MSG(CApplicationView)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG
	...
};
~cpp 
/////////////////////////////////////////////////////////////////////////////
// CApplicationView message handlers

void CApplicationView::OnLButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	
	CView::OnLButtonDown(nFlags, point);
}

void CApplicationView::OnLButtonUp(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	
	CView::OnLButtonUp(nFlags, point);
}

void CApplicationView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
	
	CView::OnKeyDown(nChar, nRepCnt, nFlags);
}

void CApplicationView::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
	
	CView::OnKeyUp(nChar, nRepCnt, nFlags);
}

통합

  • AppWizard - 툴.
  • ClassWizard - 클 , 툴.
  • WizardBar - ClassWizard 편함.

Document/View 키텍

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:17
Processing time 0.0195 sec