那么你可以尝试这个(免责声明未经测试的伪代码):
HGDI_DC memDC = gdi_CreateCompatibleDC ( hDC );
HGDI_BITMAP memBM = gdi_CreateCompatibleBitmap ( hDC, screenWidth, screenHeight );
gdi_SelectObject ( memDC, memBM );
gdi_BitBlt(memDC, 0, 0, screenWidth, screenHeight, hDC, 0, 0, GDI_SRCCOPY);
Run Code Online (Sandbox Code Playgroud)
现在您应该拥有memBM->data完整的像素数据数组。memBM->data 的大小如下:memBM->width * memBM->height * memBM->bytesPerPixel
希望这至少对您有所帮助。