I found on Google Someone wrote a function similar to PixelGetColor But it also works on a minimized window ..
#include <iostream>
#define _WIN32_WINNT 0x0501
#include
#define PixelGetColor(x, y) PixelGet(mDC, x, y)
int CreateContext(char *window_name, HDC *hDC, HDC *mDC, HBITMAP *hBM) {
RECT win_stats;
HWND hwnd = FindWindow(NULL, window_name);
if(!GetClientRect(hwnd, &win_stats)) {
return 1;
}
*hDC = GetDC(hwnd);
*mDC = CreateCompatibleDC(*hDC);
*hBM = CreateCompatibleBitma