Sign in to follow this  

Blitting a buffer with win32api BitBlt?

Recommended Posts

In windows, the way to get direct pixel access to something is through a DIBSection. First, you use CreateDIBSection to make essentially a 'blank bitmap', then you fill it using the pointer you get, then1 you create a DC, select the DIB into it (you get a bitmap handle when you create it) and then you can BitBlt from that DC to any other.

[1] There are functions to blit directly from DIBs, but I've found them to be extremely buggy even in Windows XP. There are numerous MS Knowledge Base entries covering those functions, and I also had problems not listed there but mentioned numerous times on the internet by other people trying to use the functions.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this