用GetPixel函数得到每个象素的颜色,然后进行判断就行了GetPixel The GetPixel function retrieves the red, green, blue (RGB) color value of the pixel at the specified coordinates. COLORREF GetPixel( HDC hdc, // handle to device context int XPos, // x-coordinate of pixel int nYPos // y-coordinate of pixel );
The GetPixel function retrieves the red, green, blue (RGB) color value of the pixel at the specified coordinates. COLORREF GetPixel(
HDC hdc, // handle to device context
int XPos, // x-coordinate of pixel
int nYPos // y-coordinate of pixel
);