1. Change icon on toolbar button?
- Posted by Mike <vulcan at win.co.nz> Jun 21, 2002
- 422 views
Derek, Matt or other Win32 experts, I am using a (normal) toolbar in a window. Is there someway of changing the bitmap that a button is created with? I have tried using.. sendMessage(TB, TB_CHANGEBITMAP, iControl, iIcon) ..but it did not work. In the win32.hlp file it looked like I might have to use an imagelist. How does this work for normal toolbars (I know it works for flat toolbars)? TIA Mike
2. Re: Change icon on toolbar button?
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 22, 2002
- 392 views
Mike, I'm assuming you are using PictureButtons on the Toolbar. If that is the case, you can use setBitmap() to change its bitmap image. If you are using LoadBitmapFromFile() and then setBitmap() , remember to deleteObject() any bitmaps you don't need anymore so they don't use up resources. I'm having trouble getting Icons to work with these buttons. I'm still trying though. ------------ Derek. ----- Original Message ----- From: "Mike" <vulcan at win.co.nz> To: "EUforum" <EUforum at topica.com> Sent: Saturday, June 22, 2002 12:21 PM Subject: Change icon on toolbar button? > > Derek, Matt or other Win32 experts, > > I am using a (normal) toolbar in a window. Is there someway of changing > the bitmap that a button is created with? > I have tried using.. > > sendMessage(TB, TB_CHANGEBITMAP, iControl, iIcon) > > ..but it did not work. In the win32.hlp file it looked like I might have > to use an imagelist. > How does this work for normal toolbars (I know it works for flat > toolbars)? > > TIA > > Mike > > > > >