Windows API `GetPixel()' always return `CLR_INVALID`, but `SetPixel()` is
worked well?
My OS is windows 7 64-bits with 2 monitors display.
I use GetPixel(), but it always return CLR_INVALID as result like that:
COLORREF result = GetPixel(dc,x,y);
My GetDeviceCaps(RASTERCAPS) returns result that RC_BITBLT is enabled.
GetDeviceCaps(COLORMGMTCAPS) returns result is CM_GAMMA_RAMP.
Most importantly, if I SetPixel(dc,x,y,RGB(250,250,250)) in advance, and
GetPixel(dc,x,y) later, I can retreive correct result at all. So I think
my coordination should be alright.
Well. I have no idea about why GetPixel() always return CLR_INVALID, but
SetPixel() is always worked well? Any question?
No comments:
Post a Comment