Keith Dicken
Keith Dicken

Reputation: 1

Get pixel outputting 0xFF for all colors

For about 2 hours or so, the code below works fine but after that, all the colors turn to 255.

Is this code using some sort of cache or stack that needs clearing and if so, what do I need to add?

Note, cursor position is being set just before this code to the same location and the location is never white.

I have looked online for a solution but not found one.

POINT _cursor;
GetCursorPos(&_cursor);
COLORREF _color = (*pGetPixel) (_hdc, _cursor.x, _cursor.y);
int _red = GetRValue(_color);
int _green = GetGValue(_color);
int _blue = GetBValue(_color);

Upvotes: 0

Views: 34

Answers (0)

Related Questions