Archived

This topic is now archived and is closed to further replies.

Get rid of GetDC

This topic is 5886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve been wanting to get the color of the positon of which the mouse is on with DirectX7. I have it on a directdraw surface and I''ve been using GetDC and ReleaseDC with the surface along with GetPixel to find the pixel color. I was wondering if there''s anyother way to do it. Maybe by locking the surface or something because I know this isn''t very fast.

Share this post


Link to post
Share on other sites
Don''t know much detail about how directdraw surfaces work.

If it were a bimap, maybe get the x,y pos of the mouse and the width,height of your surface. Use those to calculate an offset then get the information from the buffer where the bitmap data is stored.

Share this post


Link to post
Share on other sites