gdi - Draw the screen to a window using StretchBlt() -
i'm working on program capture screen , draw on window.
this drawing thread function:
void drawfunc(void*hwnd) { hdc windowdc=getdc((hwnd)hwnd); hdc desktopdc=getdc(getdesktopwindow()); for(;;) { rect rect; getclientrect((hwnd)hwnd,&rect); stretchblt(windowdc,0,0,rect.right-rect.left,rect.bottom-rect.top,desktopdc,0,0,1920,1080,srccopy); } }
the problem stretchblt slow(about 20 fps) should improve performance? thanks.
Comments
Post a Comment