how to get main explorer's url
C / C++ / MFC
2
Posts
1
Posters
0
Views
1
Watching
-
i wrote a html control that is hosted in an html page (in an explorer bar). how do i get the address of the page that's hosted in that main internet explorer? thanks melinda
It would be helpful to show the route I've been taking: CComPtr spDisp; hr = m_spBrowser->get_Document( &spDisp ); CComPtr spDoc2; hr = spDisp->QueryInterface( &spDoc2 ); CComPtr spWindow; hr = spDoc2->get_parentWindow( &spWindow ); spDoc2 = NULL; spWindow->get_document( &spDoc2 ); CComBSTR bstrParentUrl; spDoc2->get_URL( &bstrParentUrl ); In bstrParentUrl I get a bizarre value like "res//C:\DOCUMEN~1\...." I've tried many other approaches and either get an empty string or this value. Thanks Melinda.