IE Toolbar and BHO question



We have added a toolbar button using the registry method. We also have created a BHO that correctly sinks the OnDocumentComplete. What we want to do is change the toolbar button based upon information in the url, or information in the html.

In setup we grab the toolbar and imagelist of the browser
We add some bitmaps to the imagelist
In OnDocumentComplete we make the decision which image to use and then call TB_CHANGEBUTTON to change it.

here are the issues:
1. no matter what we do we cant get transparency to match up bitmaps are displayed with a black background
2. sometimes IE displays the new toolbar bitmap, and then very rapidly changes back to the icon specified in the registry.
3. Calling TB_GETBUTTON returns 0x00010007 or 65543 for the iBitmap member. What is this?

Any ideas or pointers on how to do this would be great!

Peter
.