Re: To set a BitMap on a Button Control
Here are a couple of articles about working with bitmaps on buttons that
might help you. It's really pretty easy:
http://www.codersource.net/mfc_bitmap_button.html
http://www.codeproject.com/buttonctrl/choverbitmapbutton.asp
This class might also be interesting to you since it offers tons of features
with bitmaps:
http://www.codeproject.com/buttonctrl/cbuttonst.asp
Tom
"lucky" <Laxmanmaruthy@gmail.com> wrote in message
news:1173785037.662761.199480@8g2000cwh.googlegroups.com...
Hi,
I have a CButton control dragged and placed from the ToolBox on a
dialog.
I have a BitMap with id has IDB_BITMAP_UP, which i want to load onto
this button control.
I tried like this,
HBITMAP hbitmap;
hbitmap = LoadBitmap(::AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDB_BITMAP_UP));
then what we should do with "hbitmap".
I saw the API "SetBitmap" so i did
SetBitmap(hbitmap);
But it is giving a error that 'SetBitmap': identifier not found.
I tried to have a CBitmapButton Class member in my class but it gives
error saying
CBitmapButton member not found .
So what to do............