Hier mal ein Beispielcode...
Code:
#include <iostream>
#include <Windows.h>
using namespace std;
int main()
{
HDC hdc = GetDC(NULL);
COLORREF color = GetPixel(hdc, 100, 100);
ReleaseDC(NULL, hdc);
int color_red = GetRValue(color);
int color_green = GetGValue(color);
int color_blue = GetBValue(color);
cout << "\nRot: " << color_red << "\nGruen: " << color_green <<"\nBlau: " << color_blue;
cin.get();
return 0;
}
Alternativ kannst du natürlich auch einfach color ausgeben...