ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • 컴퓨터 화면 캡쳐 - MFC
    GUI/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);
    }

Designed by Tistory.