News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

GetPixel Failing?

Started by Slugsnack, May 06, 2009, 06:09:17 PM

Previous topic - Next topic

Slugsnack

Any idea why it keeps returning CLR_INVALID?!




[attachment deleted by admin]

Relvinian

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

Slugsnack

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.

Slugsnack

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 !!

Farabi

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.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Slugsnack

I was just using it to beat my brother at this clicking game on asciitable.com XD