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 auto put string into edit control and press button on web page?

How to auto put string into edit control and press button on web page?

Scheduled Pinned Locked Moved C / C++ / MFC
c++comtutorialquestion
4 Posts 3 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.
  • H Offline
    H Offline
    hanlei0000000009
    wrote on last edited by
    #1

    I use CWebBrowser2 to open web page:

    CWebBrowser2 m_webBrow2;
    m_webBrow2.Navigate("http://www.google.com",NULL,NULL,NULL,NULL);

    When web page has been opend, I can put "my search" into google's search edit control by keyboard and press search button by mouse. But, how to do these by C++ code? Is CWebBrowser2 have member can do this?

    N B 2 Replies Last reply
    0
    • H hanlei0000000009

      I use CWebBrowser2 to open web page:

      CWebBrowser2 m_webBrow2;
      m_webBrow2.Navigate("http://www.google.com",NULL,NULL,NULL,NULL);

      When web page has been opend, I can put "my search" into google's search edit control by keyboard and press search button by mouse. But, how to do these by C++ code? Is CWebBrowser2 have member can do this?

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      hanlei0000000009 wrote:

      m_webBrow2.Navigate("http://www.google.com",NULL,NULL,NULL,NULL);

      Directly use a search query string. Modify navigation string to include the search term too! Click on this link and see what happens, and the same you can do with the navigate function! http://www.google.co.in/search?q=CodeProject+Nibu+Babu+Thomas[^] ;)

      Nibu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

      modified on Tuesday, June 17, 2008 11:24 PM

      H 1 Reply Last reply
      0
      • N Nibu babu thomas

        hanlei0000000009 wrote:

        m_webBrow2.Navigate("http://www.google.com",NULL,NULL,NULL,NULL);

        Directly use a search query string. Modify navigation string to include the search term too! Click on this link and see what happens, and the same you can do with the navigate function! http://www.google.co.in/search?q=CodeProject+Nibu+Babu+Thomas[^] ;)

        Nibu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

        modified on Tuesday, June 17, 2008 11:24 PM

        H Offline
        H Offline
        hanlei0000000009
        wrote on last edited by
        #3

        thanks. But, google.com only a sample. If web page is an other and if after press a button web page not change to another page? So, I cannot work on all web page by this way.

        1 Reply Last reply
        0
        • H hanlei0000000009

          I use CWebBrowser2 to open web page:

          CWebBrowser2 m_webBrow2;
          m_webBrow2.Navigate("http://www.google.com",NULL,NULL,NULL,NULL);

          When web page has been opend, I can put "my search" into google's search edit control by keyboard and press search button by mouse. But, how to do these by C++ code? Is CWebBrowser2 have member can do this?

          B Offline
          B Offline
          blackwolf12333
          wrote on last edited by
          #4

          good question, i'm trying this to for a while but I haven't found anything, do you?

          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