NailSR

I'm working on custom IE toolbar (VC++ 6.0).

It is necessary to adjust the size of my toolbar's buttons accordingly to the state of the standard toolbar icons size (when user changes property "Use Large Icons" buttons in my toolbar have to be sized appropriately). So, how to catch the change of toolbar icons size

Second question is how to catch changing state of IE window - activated/deactivated

Can anyone provide me with good advice Does DWebBrowserEvents2 help me

TIA




Re: Internet Explorer Extension Development How to catch the change of toolbar icons size? How to track the state of IE window?

IECUSTOMIZER

Hi,

No, The documentaion says that you should have 2 icon sizes, 22x22 px and 16x16 px, but this is not required. I have made toolbar buttons with normal sized icons (32x32) and even 48x48. They are resized automatically when rendered in the toolbar.

Regards.






Re: Internet Explorer Extension Development How to catch the change of toolbar icons size? How to track the state of IE window?

NailSR

Thanks IECUSTOMIZER,

but my buttons on toolbar are painted by myself, and I have to know the current size of standard toolbar icons to paint buttons in correct size.

As I have checked DWebBrowserEvents2 doesn't generate events on changing the toolbar icons size, and on activate/deactivate IE window (I have to automatically show popup menu, but it's better to do it only if IE window is the topmost and active window).

I guess only window subclassing can help me.






Re: Internet Explorer Extension Development How to catch the change of toolbar icons size? How to track the state of IE window?

IECUSTOMIZER

Hi,

I do very little C++ codeing and have little experience using it. What about bitblt called in your toolbar resize event I assume you are using a rebar for your toolbar container

Or am I missing something here

Do you want to know when the user changes the Icon size choice on the Buttons Toolbar or Command bar (Ie7).

That is a registry setting... I think in HKCU\Software\Micrsoft\Internet Explorer\Toolbars there is a CLSID (IE796980....) value that holds the Buttons Toolbar layout settings (I think that is the value name... you will have to use the regmon utility to find the exact name of the value that is changed when the Buttons Toolbar icon size is changed)

You would have to monitor that key to find out when it is changed, but there may also be values passed in the onPropertyChanged event of the Web browser.

I have not seen any other toolbars for IE resize their icons (for example when a toolbar is placed on the same line as the buttons toolbar with large icons)

Resizing icons should be automatic, with no codeing required, determined by system metrics settings of the user.






Re: Internet Explorer Extension Development How to catch the change of toolbar icons size? How to track the state of IE window?

NailSR

No, I don't use MFC, only ATL.
So, my toolbar window class is not a rebar, just simple window.

Value in registry is HKCU\Software\Microsoft\Internet Explorer\CommandBar\SmallIcons.

But tracking registry... only when there is no other way.

I don't want automatic resize of the buttons on my toolbar, as usually customer wants it.

Anyway thanks, I just want to know that there is no easy solution.






Re: Internet Explorer Extension Development How to catch the change of toolbar icons size? How to track the state of IE window?

Digvijay

Hi,

You can subclass the WndProc for the Command bar and use TBN_* notifications to draw your custom icons as well as make any other changes.

See it here : http://yousef.dardiry.com/ie7-advanced-toolbar-buttons/

Regards,

Digvijay