Mojo George

I am developing a browser extension that uses the WebBrowser object. Since there are separate WebBrowser objects to each tab in IE7, I need to know which tab becomes active during tab switching. How do I get a notification for this

Thanks,

Mojo



Re: Internet Explorer Extension Development How do I get the notification when the active tab is changed?

Dave Massy

Hi Mojo,

Where are you trying to access this information from There are no direct programming interfaces for tabs in IE7 but you shoudl be able to automate access using the accessibility interfaces.

Thanks
-Dave






Re: Internet Explorer Extension Development How do I get the notification when the active tab is changed?

John Sudds

Have you looked at the new tab-related notifications described in Tabbed Browsing for Developers on MSDN I can't guarantee these will give you what you want, but it might be a place to start...

Tab-Related Notifications

When applications hosting the WebBrowser Control enable tabbed browsing shortcuts, they can receive and respond to notifications that occur when the user initiates a tab-related action, such as opening a link in a new tab.

These notifications arrive through the DWebBrowserEvents2::NewWindow3 event. The dwFlags parameter can now include the following flags:

  • NWMF_FORCEWINDOW: User opened a link in a new window.
  • NWMF_FORCETAB: User opened a link in a new tab.
  • NWMF_INACTIVETAB: An inactive tab tried to open a window.

Applications that provide their own tabbed interface can use these flags to respond to the user. Those writing extensions, such as custom toolbars, browser helper objects (BHO's), and other add-ons, can use these notifications to customize Internet Explorer 7.






Re: Internet Explorer Extension Development How do I get the notification when the active tab is changed?

John Sudds

Mojo,

I got a little more information from the product team that might be the missing piece to this puzzle. It sounds like you can use this event to determine when tabbed windows are activated.




Re: Internet Explorer Extension Development How do I get the notification when the active tab is changed?

Mojo George

Hi John,

Thank you for your reply. I think this may help me. I need to update my Platform SDK to try it, because DISPID_WINDOWSTATECHANGED is not defined in my ExDispid.h. I will try out and get back.

One more question regarding tab-switching on IE7, Is there any window message to IEFrame window from TabwindowClass, Shell DocObject View or Internet Explorer_Server window of the tab, which becomes active during tab switching, so that we can catch it by sub-classing IEFrame window

Thanks,

Mojo





Re: Internet Explorer Extension Development How do I get the notification when the active tab is changed?

fvicaria

Hi,

What are the actual values for these flags

  • NWMF_FORCEWINDOW
  • NWMF_FORCETAB
  • NWMF_INACTIVETAB

Thanks!

Fernando