Painting to a Window
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement