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 open a website page in MFC

how open a website page in MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++comquestion
9 Posts 4 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.
  • Y Offline
    Y Offline
    Y_Kaushik
    wrote on last edited by
    #1

    Hi I am useing ShellExecute() function for open Internet Expoler Using this code UpdateData(TRUE); ShellExecute( 0, "open","C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE",0,0,SW_SHOW); Its work correctly.... Now I want When i press OK Button a A web page (Suppose www.codeproject.com )open can any one told me how can i do this

    Regard's Kaushik

    B H S 3 Replies Last reply
    0
    • Y Y_Kaushik

      Hi I am useing ShellExecute() function for open Internet Expoler Using this code UpdateData(TRUE); ShellExecute( 0, "open","C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE",0,0,SW_SHOW); Its work correctly.... Now I want When i press OK Button a A web page (Suppose www.codeproject.com )open can any one told me how can i do this

      Regard's Kaushik

      B Offline
      B Offline
      baerten
      wrote on last edited by
      #2

      ShellExecute( 0, "open","www.codeproject.com",0,0,SW_SHOW);

      Y 1 Reply Last reply
      0
      • B baerten

        ShellExecute( 0, "open","www.codeproject.com",0,0,SW_SHOW);

        Y Offline
        Y Offline
        Y_Kaushik
        wrote on last edited by
        #3

        Thank you So much sir

        Regard's Kaushik

        B 1 Reply Last reply
        0
        • Y Y_Kaushik

          Hi I am useing ShellExecute() function for open Internet Expoler Using this code UpdateData(TRUE); ShellExecute( 0, "open","C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE",0,0,SW_SHOW); Its work correctly.... Now I want When i press OK Button a A web page (Suppose www.codeproject.com )open can any one told me how can i do this

          Regard's Kaushik

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          Do you need to CDhtmlDialog?


          WhiteSky


          Y 1 Reply Last reply
          0
          • Y Y_Kaushik

            Thank you So much sir

            Regard's Kaushik

            B Offline
            B Offline
            baerten
            wrote on last edited by
            #5

            No problemo :)

            1 Reply Last reply
            0
            • H Hamid Taebi

              Do you need to CDhtmlDialog?


              WhiteSky


              Y Offline
              Y Offline
              Y_Kaushik
              wrote on last edited by
              #6

              I make a application ( Program )in MFC Modal Dialog based now. Suppose i make a button in any form . I need when i press it an SDI Application open ( I don't know Its possible or not) If Yes How can we call SDI program . How we will be set depedency between project.

              Regard's Kaushik

              H 1 Reply Last reply
              0
              • Y Y_Kaushik

                Hi I am useing ShellExecute() function for open Internet Expoler Using this code UpdateData(TRUE); ShellExecute( 0, "open","C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE",0,0,SW_SHOW); Its work correctly.... Now I want When i press OK Button a A web page (Suppose www.codeproject.com )open can any one told me how can i do this

                Regard's Kaushik

                S Offline
                S Offline
                sps itsec46
                wrote on last edited by
                #7

                Checkout the XHyperLink[^] article. There you'll find the static method CXHyperLink::GoToURL() which does some advanced checking instead of just ShellExecute'ing the passed URL. Since the method is static you can just copy&paste the method into your own code if you don't want to use the whole CXHyperLink class.

                cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

                Y 1 Reply Last reply
                0
                • Y Y_Kaushik

                  I make a application ( Program )in MFC Modal Dialog based now. Suppose i make a button in any form . I need when i press it an SDI Application open ( I don't know Its possible or not) If Yes How can we call SDI program . How we will be set depedency between project.

                  Regard's Kaushik

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #8

                  I dont know this message is like your previous message or is different if you want to open html page on your program you can also use of CHtmlView.


                  WhiteSky


                  1 Reply Last reply
                  0
                  • S sps itsec46

                    Checkout the XHyperLink[^] article. There you'll find the static method CXHyperLink::GoToURL() which does some advanced checking instead of just ShellExecute'ing the passed URL. Since the method is static you can just copy&paste the method into your own code if you don't want to use the whole CXHyperLink class.

                    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

                    Y Offline
                    Y Offline
                    Y_Kaushik
                    wrote on last edited by
                    #9

                    Thanks for such a nice article

                    Regard's Kaushik

                    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