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 =
OpenGL might be rendering into a layered context; try
BitBlt(memDC, 0, 0, Width, Height , hDC, BEGINX, BEGINY, SRCCOPY | CAPTUREBLT);
instead.