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 get the right URL before navigating the web page in the CHtmlView?

How to get the right URL before navigating the web page in the CHtmlView?

Scheduled Pinned Locked Moved C / C++ / MFC
questionjavascripthtmltutorial
1 Posts 1 Posters 0 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.
  • S Offline
    S Offline
    superhandwolf
    wrote on last edited by
    #1

    How to get the right URL before navigating the web page in the CHtmlView? Class CHTMLControl derived from CHtmlView, and over load the virtual function OnBeforeNavigate2. I Navigate an URL as following: CHTMLControl* pHTMLControl; … pHTMLControl->Navigate2(strURL); In the opened web page, there is a link whose html code is below: [Free Search](javascript:clickProcess("search");) After clicking on this link in the html view, the following function is called void CHTMLControl::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel) But in this function, the value of lpszURL is "javascript:clickProcess("search");" How can I get the right URL of the next page before navigating it? Thanks

    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