GUI/GDI
-
WMF 파일 렌더링하기GUI/GDI 2008. 12. 25. 18:49
#include "MetaFile.h" class CLoadMetaFileDoc : public CDocument { ... // Implementation public: CMetaFile m_meta; virtual ~CLoadMetaFileDoc(); ... }; BOOL CLoadMetaFileDoc::OnOpenDocument(LPCTSTR lpszPathName) { if (!CDocument::OnOpenDocument(lpszPathName)) return FALSE; // TODO: Add your specialized creation code here // { m_meta.Read(lpszPathName); // } return TRUE; } void CLoadMetaFileDoc::De..
-
확장 메타파일 - MFCGUI/GDI 2008. 12. 25. 18:20
CMetaFileDC .CreateEnhanced() .CloseEnhanced() CDC .PlayMetaFile()
-
텍스트 그리기 - MFCGUI/GDI 2008. 12. 25. 18:07
CFont .CreateFont() .CreatePointFont() .CrateFontIndirect() CFontDialog fontDlg; fontDlg.DoModal() LOGFONT logfont; fontDlg.GetCurrentFont( &logfont ); CFont font; font.CrateFontIndirect( &logfont ); CDC .SelectObject() .SetBkMode() TRANSPARENT .SetTextAlign() .DrawText() .TextOut() .GetTextExtent() .SetTextColor() .SetBkColor() class CEx06aView : public CView { void ShowFont(CDC* pDC, int& nPos..
-
(클리핑 )영역 - MFCGUI/GDI 2008. 12. 25. 16:58
CRgn .CreateRectRgn() .CreatePolygonRgn() .CreateFromPath() .CreateEllipticRgnIndirect() .GetRgnBox() .CreateRectRgnIndirect() .CopyRgn() .OffsetRgn() .CombineRgn() RGN_DIFF .PtInRegion() CDC .SelectClipRgn() .FillRgn() .FrameRgn() .BeginPath() .EndPath() class CRegionView : public CView { .. // Attributes public: CRegionDoc* GetDocument(); CRgn m_rgnStar; .. }; CRegionView::CRegionView() { .. m..
-
컴퓨터 화면 캡쳐 - MFCGUI/GDI 2008. 12. 25. 16:39
void CCaptureView::OnDraw(CDC* pDC) { CCaptureDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here // 화면의 크기를 얻음 CRect rect; GetClientRect(&rect); // 데스크 탑 윈도우의 DC를 얻음 CClientDC deskWnd(GetDesktopWindow()); // 데스크 탑 윈도우로부터 비트맵 블록 전송 pDC->BitBlt(0, 0, rect.Width(), rect.Height(), &deskWnd, 0, 0, SRCCOPY); }
-
더블 버퍼링 - MFCGUI/GDI 2008. 12. 25. 16:31
void CMemDrawView::OnDraw(CDC* pDC) { CMemDrawDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here // 화면 DC와 호환성 있는 메모리 DC를 만듦 CDC BufferDC; BufferDC.CreateCompatibleDC(pDC); // 화면 DC와 호환성 있는 메모리 비트맵을 만듦 CBitmap bmpBuffer; bmpBuffer.CreateCompatibleBitmap(pDC, 200, 200); // 메모리 DC에 메모리 비트맵을 선택 CBitmap *pOldBitmap = (CBitmap *)BufferDC.SelectObject(&bmpBuffer..
-
이미지 처리하기 - CxImageGUI/GDI 2008. 12. 25. 16:00
CxImage .Load() .CreateFromHANDLE() .CopyToHandle() .Save() .Draw() .GetWidth() .GetHeight() .Negative() .Light() .Filter() .Flip() .Mirror() .RotateLeft() .RotateRight() .Rotate() .Resample() .Crop() .Expand() .Thumbnail() ::FindType() class CImageDoc : public CDocument { ... // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CImageDoc) public: ... virtual BOOL OnO..
-
이미지 렌더링하기 - CxImageGUI/GDI 2008. 12. 22. 23:15
CxImage .Load() .CreateFromHANDLE() .CopyToHandle() .Save() .Draw() .GetWidth() .GetHeight() ::FindType() // Stdafx.h #include "xImage.h" class CImageApp : public CWinApp { public: CImageApp(); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CImageApp) public: virtual BOOL InitInstance(); //}}AFX_VIRTUAL // Implementation //{{AFX_MSG(CImageApp) ... afx_msg void O..