I need to find the color of any/all pixel/s on the screen. The code I got so far seems to do that but it doesn't get the pixel of my game window (another program, direct draw window app).
Here is the code...
The idea of the program is to place the cursor over some color and the program will show you the values for that color.Code:POINT pt; GetCursorPos(&pt); HDC hdc = GetDC(0); COLORREF pixel = GetPixel(hdc, pt.x, pt.y); ReleaseDC(0, hdc); cout << " red: " << (int)GetRValue(pixel) << " green: " << (int)GetGValue(pixel) << " blue : " << (int)GetBValue(pixel) << '\n';



LinkBack URL
About LinkBacks



