void screen(char* fileName) { HWND window = GetDesktopWindow(); HDC _dc = GetWindowDC(window); HDC dc = CreateCompatibleDC(0); RECT re; GetWindowRect(window, &re); int w = re.right, h = re.bottom; void* buf = new char[w*h*4]; HBITMAP bm = CreateCompatibleBitmap(_dc, w, h); SelectObject(dc, bm); StretchBlt(dc, 0, 0, w, h, _dc, 0, 0, w, h, SRCCOPY); void* f =CreateFile(fileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); GetObject(bm, 84, buf); tagBITMAPINFO bi; bi.bmiHeader.biSize = sizeof(bi.bmiHeader); bi.bmiHeader.biWidth = w; bi.bmiHeader.biHeight = h; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 32; bi.bmiHeader.biCompression = 0; bi.bmiHeader.biSizeImage = 0; CreateDIBSection(dc, &bi, DIB_RGB_COLORS, &buf, 0, 0); G