Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to detect what URL clicked user ?

How to detect what URL clicked user ?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vgrigor1
    wrote on last edited by
    #1

    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

    M A 2 Replies Last reply
    0
    • V vgrigor1

      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

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      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.

      V 1 Reply Last reply
      0
      • V vgrigor1

        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

        A Offline
        A Offline
        Antti Keskinen
        wrote on last edited by
        #3

        Instead of IWebBrowser2, use standard COM methods and register for notifications from the DWebBrowserEvents interface. First query for IConnectionPointContainer interface. Then ask for IConnectionPoint interface for DWebBrowserEvents. Then register your class using IConnectionPoint::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.

        V 1 Reply Last reply
        0
        • M Michael Dunn

          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.

          V Offline
          V Offline
          vgrigor1
          wrote on last edited by
          #4

          Thanks, I will try. Thanks also for links.

          1 Reply Last reply
          0
          • A Antti Keskinen

            Instead of IWebBrowser2, use standard COM methods and register for notifications from the DWebBrowserEvents interface. First query for IConnectionPointContainer interface. Then ask for IConnectionPoint interface for DWebBrowserEvents. Then register your class using IConnectionPoint::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.

            V Offline
            V Offline
            vgrigor1
            wrote on last edited by
            #5

            Thanks you I will try this way.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups