Smashery
Smashery

Reputation: 59733

Create a CBitmap from Resources ID

I need to fill a CImageList with a number of bitmaps which are stored in separate bmp files (rather than as a single bmp with numerous parts). I assume I need to create a CBitmap so I can call the Add method of CImageList. So how might one create a CBitmap object using only MFC Resource IDs?

Upvotes: 0

Views: 1075

Answers (1)

Javier De Pedro
Javier De Pedro

Reputation: 2239

You just need to use the method CBitmap::LoadBitmap.

You can either load the bitmap from the file or from resources.

Upvotes: 2

Related Questions