Copy Screen
-
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
-
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
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
-
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
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