• Advertisement

Archived

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

Painting to a Window

This topic is 5783 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''d like to paint a bitmap to a window as fast as possible. Right now, I''m using the Win GDI''s SetPixel function. It works, but it is quite slow (you can see how it updates). I wondered how all those paint programs do it, as they seem to bring the image to the screen in no time. (do they use some kind of double buffering?!) Any hint is appreaciated.

Share this post


Link to post
Share on other sites
Advertisement
Check out BitBlt and StretchBlt. To get at individual pixels, check out CreateDIBSection. Using CreateDIBSection you can access the bmp data as a buffer and plot pixels to that before blitting.

Share this post


Link to post
Share on other sites

  • Advertisement