Hayri Uğur Koltuk
Hayri Uğur Koltuk

Reputation: 3020

What is the difference between using BITMAP::bmBits vs GetDIBits?

I just realized that there is BITMAP in GDI and then you do GetObject(hBmp, sizeof(BITMAP), &bmp); in almost all of the GetDIBits examples. but the newly populated bmp here has a field: bmBits

If I already have bitmaps's bits here, why would I call GetDIBits once again?

Thanks, Ali Veli

Upvotes: 0

Views: 753

Answers (1)

mi06
mi06

Reputation: 11

Using GetObject then getting the BITMAP::bmBits to get the bits can only be used when the bitmap was created using CreateDIBSection. GetDIBits can also be used to change the format of the Bitmap or to change it from DDB to DIB.

Upvotes: 1

Related Questions