How to programmatically modify my Internet Explorer toolbar button? I am currently using visual c++.
+1
A:
If you have your own toolbar, and you want to change the state of a button (e.g. the icon, the text, the tooltip) then you just merely have to send it the correct messages.
However, my psychic powers tell me that you've created a Command Bar button by following these steps. In that case, the answer is: you can't. In IE6 and IE7 you could use FindWindow() and the Toolbar API to eventually send the right window messages to your button to get it to change its icon / text. However, in IE8 that toolbar button lives in a different Window and a different Integrity Level than your extension. So you can't send it messages.
So, my advice to you is to write your own toolbar plug-in, or give up trying to alter your icon's state.
jeffamaphone
2010-05-11 18:00:11
Yep. I followed the steps inside the website. I'm currently doing it for IE7/below only. IE8 I found out very difficult.
karikari
2010-05-12 00:25:49
or is there any way to make the button invisible/visible during run time?
karikari
2010-05-12 02:12:16
There are no practical, advisable or supported ways.
jeffamaphone
2010-05-12 13:55:45