Kenial-Computer Programming Daily Notes | UserPreferences |
void CTestView::OnDraw(CDC* pDC) { CTestDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); CString cstrTemp; cstrTemp = pDC->GetRuntimeClass()->m_lpszClassName; // TODO: add draw code for native data here }OnDraw? ÇÔ¼öÀÇ ÀÎÀÚ·Î ³Ñ¾î¿À´Â DC´Â ¹«½¼ DCÀϱõ¼î? »ó»óÀ» Çغ¸½Ã±æ.
CPaintDC ÀÌ´Ù.
CView::OnPaint?¿¡¼ È£ÃâµÊ. ¼Ò½º´Â ´ÙÀ½°ú °°À½ :
void CView::OnPaint() { // standard paint routine CPaintDC dc(this); OnPrepareDC(&dc); OnDraw(&dc); }¿ö°¼ À̵ý ÁþÀ» ÇßÀ»±î...
ã¾Æº¸´Ï OnDraw?()´Â OnPaint?().. Áï WM_PAINT ¸Þ½ÃÁö¸¦ ¹Þ¾ÒÀ»¶§¸¸ È£ÃâµÇ´Â°Ô ¾Æ´Ï¶ó,
OnPrint?() .. ÀÌ°Ç ¹º ¸Þ½ÃÁöÀÎÁö´Â ¸ð¸£°Ú´Ù¸¸ -_-; Á¿찣 ÇÁ¸°ÆÃÀ» ¼öÇàÇÏ´Â ¸Þ½ÃÁö¸¦
¹Þ¾ÒÀ»¶§µµ È£ÃâµÈ´Ù.
¾Æ¸¶µµ, ȸ鿡 ±×¸®µç ÇÁ¸°ÅÍ¿¡ ±×¸®µç.. ±×¸®´Â ³»¿ë¸¸À» OnDraw?()¿¡ Áý¾î³Ö¾î
ó¸®ÇÏ°íÀÚ ÇÏ´Â ¸ñÀûÀÌ ÀÖ´Â µí..
Âü°í·Î, OnPaint?()°¡ È£ÃâµÇ¾úÀ» ¶§ OnDraw?()¿¡ ³Ñ¾î¿À´Â °´Ã¼´Â °Á CDC´Ù.