Any idea why it keeps returning CLR_INVALID?!
(http://i121.photobucket.com/albums/o222/Slugsnack/GetPixel.jpg)
[attachment deleted by admin]
Two things come to to the top of my mind:
1) you are using GetPixel with the EBX. But EBX is NULL....That parameter in GetPixel API should be the HDC handle.
2) GetPixel will only return the pixel if it is the current clipping region.
My guess is #1. ;-)
Relvinian
Oh yeah ! Sorry that was when I was trying out other crap to try to make it work.. I changed it to null. Before then I had it as hDC from the GetDC call but it didn't work then either.
Oh no ! I am stupid.. kill me. I had messed up and forgotten to change that parameter to hDC and that was what was wrong LOL. It works perfectly now. Thanks !!
SlugSnack:
If you have understand all necessary things about it, try using donkey graph lib. It will speed up things. But I dont know about GDIp new setpixel function speed.
I was just using it to beat my brother at this clicking game on asciitable.com XD
(http://img5.imageshack.us/img5/3552/clickb.jpg)