Archived

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

_Jax_

Painting to a Window

Recommended Posts

_Jax_    122
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
LessBread    1415
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