how do I get a Resource ID of a CBitmap?

M

mark

I want to use CBitmapButton. This class knows the function LoadBitmaps
to set a bitmap in a button.

The problem is that LoadBitmaps is asking for a Resource ID.
I have loaded the bmp file in CBitmap, but how do I get this Resource
ID now???

please help

//loading the file 'test.bmp' in CBitmap:
CBitmap bmp;
BITMAP bitmap;
BITMAP bits;

m_pHBitmap = SHLoadDIBitmap("\test\test.bmp");
bmp.Attach(m_pHBitmap);
bmp.GetBitmap(&bitmap);

//now load the bitmap, but this doesn't work!
CBitmapButton::LoadBitmaps(bmp.GetBitmap(&bitmap), 0, 0, 0 );
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top