hwnd to ppm issue
问题 I have a function which save a hwnd into a ppm file. This function is inspired by a msdn example. Both the msdn sample and my function work but ... I have an issue ... But first, here is the function. int CaptureAnImage(HWND hWnd) { HDC hdcWindow; HDC hdcMemDC = NULL; HBITMAP hbmScreen = NULL; RECT rc; BITMAPINFOHEADER bi; DWORD dwBmpSize; HANDLE hDIB; char *lpbitmap; int w, h; FILE *f; // Retrieve the handle to a display device context for the client // area of the window. hdcWindow = GetDC