Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Copy Screen

Copy Screen

Scheduled Pinned Locked Moved C / C++ / MFC
graphicscomjsonhelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Timothy Grabrian
    wrote on last edited by
    #1

    I'm trying to capture the whole screen, paint it in my fullscreen window, then add effects to it (transitions and such). I have a fealing I have to use CreateCompatibleDC but I can't figure out where. Here is a simplified version of what my code looks like: INT ScreenWidth = GetSystemMetrics(SM_CXSCREEN); INT ScreenHeight = GetSystemMetrics(SM_CYSCREEN); HDC DesktopDC = GetDC(0);//I do this before my window is displayed HDC MyDC = GetDC(hWnd);//hWnd Is my window BitBlt(MyDC,0,0,ScreenWidth,ScreenHeight,DesktopDC,0,0,SRCCOPY);//Trying to cover my window Any one care to help? (WIN32 API only please) Also could you show me how to double buffer for flicker free drawing? P.S. GDI is tough wWw.KruncherInc.cOm

    T D 2 Replies Last reply
    0
    • T Timothy Grabrian

      I'm trying to capture the whole screen, paint it in my fullscreen window, then add effects to it (transitions and such). I have a fealing I have to use CreateCompatibleDC but I can't figure out where. Here is a simplified version of what my code looks like: INT ScreenWidth = GetSystemMetrics(SM_CXSCREEN); INT ScreenHeight = GetSystemMetrics(SM_CYSCREEN); HDC DesktopDC = GetDC(0);//I do this before my window is displayed HDC MyDC = GetDC(hWnd);//hWnd Is my window BitBlt(MyDC,0,0,ScreenWidth,ScreenHeight,DesktopDC,0,0,SRCCOPY);//Trying to cover my window Any one care to help? (WIN32 API only please) Also could you show me how to double buffer for flicker free drawing? P.S. GDI is tough wWw.KruncherInc.cOm

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      i think this article with help you http://www.codeproject.com/gdi/barry_s_screen_capture.asp[^] ----------------------------- "I Think this Will Help" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk

      1 Reply Last reply
      0
      • T Timothy Grabrian

        I'm trying to capture the whole screen, paint it in my fullscreen window, then add effects to it (transitions and such). I have a fealing I have to use CreateCompatibleDC but I can't figure out where. Here is a simplified version of what my code looks like: INT ScreenWidth = GetSystemMetrics(SM_CXSCREEN); INT ScreenHeight = GetSystemMetrics(SM_CYSCREEN); HDC DesktopDC = GetDC(0);//I do this before my window is displayed HDC MyDC = GetDC(hWnd);//hWnd Is my window BitBlt(MyDC,0,0,ScreenWidth,ScreenHeight,DesktopDC,0,0,SRCCOPY);//Trying to cover my window Any one care to help? (WIN32 API only please) Also could you show me how to double buffer for flicker free drawing? P.S. GDI is tough wWw.KruncherInc.cOm

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Here is another example.


        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups