GUI/GDI
-
Draw - MFCGUI/GDI 2008. 12. 21. 16:03
CWnd OnPaint .Invalidate() .GetDC() .ReleaseDC() CDC -> CPaintDC -> CClientDC c.f CWnd.GetDC() -> CWindowDC GDI 객체 펜 옵션 브러시 옵션 c.f. .FillRect() 그래픽 함수 .SetMapMode() .SetWindowExt() .SetViewportExt() .SetWindowOrg() .SetViewportOrg() .LPtoDP() .DPtoLP() .SelectObject() // GDI 객체들을 생성 후 적용 .SelectStockObject() BLACK_PEN|WHITE_PEN|WHITE_BRUSH .MoveTo() .LineTo() .TextOut() .SetTextAlign() TA_LEFT T..
-
Animation - MFCGUI/GDI 2008. 12. 10. 01:37
class CPractice7_2View : public CView { ... protected: // Generated message map functions protected: //{{AFX_MSG(CPractice7_2View) ... afx_msg void OnAnimationStart(); afx_msg void OnAnimationStop(); afx_msg void OnTimer(UINT nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: static int bitmap_inc; // 애니메이션 카운터 증가변수 void ShowCharacter( ); int m_nBitmapMode; }; int CPractice7_2View::bitmap_inc..
-
비트맵 - MFCGUI/GDI 2008. 12. 10. 01:18
MFC는 DIB를 지원하지 않는다. CBitmap .CreateBitmap() .LoadBitmap() .CreateCompatibleBitmap() CWnd .GetDesktopWindow() CDC .CreateCompatibleDC() .SelectObject() .BitBlt() SRCCOPY|SRCAND|SRCPAINT CClientDC -> CDC CWindowDC -> CDC void CMemDrawView::OnDraw(CDC* pDC) { CBitmap bmpBuffer; CDC BufferDC; BufferDC.CreateCompatibleDC(pDC); bmpBuffer.CreateCompatibleBitmap(pDC, 200, 200); CBitmap *pOldBitmap = (CB..