smoothie1248
Programmer
Hi,
I am trying to use GDI GetPixel function. I first get the DC using
hdc = GetDC(hWnd);
then call GetPixel(hdc,x,y); function. However GetPixel returns -1 which obviously shows that GetPixel cannot read from the dc. I found that I should use GetDeviceCaps to check whether the dc is capable of giving this information. What if it is not? how can I read the RGB values of a position in the window?
Thank you.
I am trying to use GDI GetPixel function. I first get the DC using
hdc = GetDC(hWnd);
then call GetPixel(hdc,x,y); function. However GetPixel returns -1 which obviously shows that GetPixel cannot read from the dc. I found that I should use GetDeviceCaps to check whether the dc is capable of giving this information. What if it is not? how can I read the RGB values of a position in the window?
Thank you.