Click to See Complete Forum and Search --> : About device context


Ayok_83
April 26th, 2004, 07:38 AM
hi guru.

I've make simple program to draw in Client Area (by use LBUTTONDOWN, ONMouseMove), and i have problem to get pixel information, help me please

tomcant
April 28th, 2004, 04:45 AM
You could use the PIXELFORMAT structure but you would need to use DirectX to get at it.

Marc G
April 28th, 2004, 06:16 AM
To get the color of 1 pixel, you can use GetPixel().
To get all pixels at once, you can use GetDIBits.

hvjahagirdar
April 29th, 2004, 02:45 AM
GetPixel() takes in parameters for X and Y coordinates you want to retereive the COLORREF value and the HDC for the window for which you are retreiving it.

Ayok_83
May 7th, 2004, 02:44 AM
to tomcant,
i'm a beginner in graphics programming, maybe try it later. Thank You

to Marc G and hvjahagirdar
thank you, the method sounds work. :)

my Regard for you all

Ayok