1. RE: Change icon on toolbar button?
- Posted by Mike <vulcan at win.co.nz> Jun 22, 2002
- 455 views
Derek, Thanks for the help. I had forgotten just how easy some solutions can be. Mike. Derek Parnell wrote: > 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 > > > > vulcan at win.co.nz
2. RE: Change icon on toolbar button?
- Posted by jordah ferguson <jorfergie03 at yahoo.com> Jun 22, 2002
- 491 views
Mike, Win32lib has three image lists already created for the Flattoolbar, so to make your change you'll have to get Dirty. As i don't think a Normal Toolbar in win32lib has a pre - made Image List. A FlatToolbar is just a normal toolbar with TBS_FLAT so it shouldn't matter. Also you have an option of using an Image List or not cause toolbars have their internal way of storing images. Image Lists just add more flexibility to the way u use images. I'm going home to create an example of changing bitmaps or images on toolbars. I'll email it to you incase your question hasn't been answered jordah ferguson Mike wrote: > 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 > > >