Re: How to detect selected Tab in IE7?
- From: Jean-Fabrice RABAUTE <jfr@xxxxxxxxxxxxxxxx>
- Date: Tue, 07 Nov 2006 15:47:15 +0100
peter.isberg@xxxxxxxxx a écrit :
Igor Tandetnik skrev:
Right. Isn't that the point? You wanted a unique HWND for each tab - you
got it.
;-), well not quite. I wanted to find a way to figure out how to detect
the selected tab. I.e. to get a pWebBrowser to that tab/object/ie.
Getting the unique HWND is of no use if I can't use it to get to the
object it represents.
I mean, I can enumerate all objects in the IE frame that is most on
top. I can find unique (useless) HWNDs for each tab. But, I still can't
detect what TAB that is currently selected.
My goal is to detect the selected tab and then communicate with that
object. I get close but no cigar.
/Peter
Hi,
There is no interface (the interface may exists, but no doc so far from MS) to get the info of the selected tab.
We solved the problem on our Inline Search plugin (http://www.ieforge.com/InlineSearch/HomePage) by using a tricky workaround (not beautiful but it is working !) :
1/ Get the HWND of the webbrowser in the tab (the HWND given by the code from Igor).
2/ Get the parent and then again the parent of this window.
3/ Check if this window (that is the parent/parent) is enabled. If so, this is the default tab, if not the tab is disabled.
You can iterate through all the webbrowser objects until you find the one that is activated.
If another solution exists, please do not hesitate to share. The solution I gave is still a workaround not really "strong".
--
Regards / Cordialement
====================
Jean-Fabrice Rabaute
CORE SERVICES :: Software/Web development & Consulting services
http://www.debugbar.com : The most advanced WEB development tool for Internet Explorer
http://www.core-services.fr - {Enjoy the future today}
.
- Follow-Ups:
- Re: How to detect selected Tab in IE7?
- From: peter . isberg
- Re: How to detect selected Tab in IE7?
- References:
- How to detect selected Tab in IE7?
- From: peter . isberg
- Re: How to detect selected Tab in IE7?
- From: Igor Tandetnik
- Re: How to detect selected Tab in IE7?
- From: peter . isberg
- Re: How to detect selected Tab in IE7?
- From: Igor Tandetnik
- Re: How to detect selected Tab in IE7?
- From: peter . isberg
- How to detect selected Tab in IE7?
- Prev by Date: Re: How to detect selected Tab in IE7?
- Next by Date: Re: Open new Internet Explorer window in a new process
- Previous by thread: Re: How to detect selected Tab in IE7?
- Next by thread: Re: How to detect selected Tab in IE7?
- Index(es):
Relevant Pages
|
|