How to detect what URL clicked user ?
-
How to detect what URL clicked user ? I have IWebBrowser2 And can catch On_Navigate2, but current URL is old, how to get pressed URL ? Thanks
The
OnBeforeNavigate2
event passes you the URL about to be navigated to. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb Magnae clunes mihi placent, nec possum de hac re mentiri. -
How to detect what URL clicked user ? I have IWebBrowser2 And can catch On_Navigate2, but current URL is old, how to get pressed URL ? Thanks
Instead of
IWebBrowser2
, use standard COM methods and register for notifications from theDWebBrowserEvents
interface. First query forIConnectionPointContainer
interface. Then ask forIConnectionPoint
interface forDWebBrowserEvents
. Then register your class usingIConnectionPoint::Advise
. The class you use must be derived from DWebBrowserEvents and must implement all of it's methods. Unused events should return S_OK. The event you're interested in is DWebBrowserEvents::NavigateComplete. This event will have the final URL where the client was directed to. -Antti Keskinen ---------------------------------------------- "If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?" -- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon. -
The
OnBeforeNavigate2
event passes you the URL about to be navigated to. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb Magnae clunes mihi placent, nec possum de hac re mentiri. -
Instead of
IWebBrowser2
, use standard COM methods and register for notifications from theDWebBrowserEvents
interface. First query forIConnectionPointContainer
interface. Then ask forIConnectionPoint
interface forDWebBrowserEvents
. Then register your class usingIConnectionPoint::Advise
. The class you use must be derived from DWebBrowserEvents and must implement all of it's methods. Unused events should return S_OK. The event you're interested in is DWebBrowserEvents::NavigateComplete. This event will have the final URL where the client was directed to. -Antti Keskinen ---------------------------------------------- "If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?" -- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon.