Getting screenshot of a child window running OpenGL in it (Windows)

后端 未结 4 1059
醉酒成梦
醉酒成梦 2020-12-19 19:54

I have a main window with children. I need to take screenshots programmatically to crop and draw them back on my main window. The way I do this is:

HDC hDC =         


        
4条回答
  •  半阙折子戏
    2020-12-19 20:44

    OpenGL might be rendering into a layered context; try

    BitBlt(memDC, 0, 0, Width, Height , hDC, BEGINX, BEGINY, SRCCOPY | CAPTUREBLT);
    

    instead.

提交回复
热议问题