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 Load Image from url?

How to Load Image from url?

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcomtutorialquestion
6 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.
  • S Offline
    S Offline
    SIJUTHOMASP
    wrote on last edited by
    #1

    HI, Is there any way to load image from a url. I have one activex control which has been used in the web application and the application will pass an UNC path to the control. From that path, the control will load the image. The activex control has been written in vc++/MFC. I need to load the image using the url. For eg: http://site/test.tiff. I have modified the code of the activex control and given the url, then it was failing with the error "assertion failure". My confusion is this, when I tried to open the image as url through IE, it could open, but when it is passed to the program it couldn't load. Will you please help and provide me the way if it is possible. Is there any way to load the image instead of passing the path and directly passing the imgage itself. Any idea why it couldn't load the image from url and only it is loading from UNC path. Thanks in Advance, Rahul.

    S H 2 Replies Last reply
    0
    • S SIJUTHOMASP

      HI, Is there any way to load image from a url. I have one activex control which has been used in the web application and the application will pass an UNC path to the control. From that path, the control will load the image. The activex control has been written in vc++/MFC. I need to load the image using the url. For eg: http://site/test.tiff. I have modified the code of the activex control and given the url, then it was failing with the error "assertion failure". My confusion is this, when I tried to open the image as url through IE, it could open, but when it is passed to the program it couldn't load. Will you please help and provide me the way if it is possible. Is there any way to load the image instead of passing the path and directly passing the imgage itself. Any idea why it couldn't load the image from url and only it is loading from UNC path. Thanks in Advance, Rahul.

      S Offline
      S Offline
      sashoalm
      wrote on last edited by
      #2

      Is this control supposed to be able to load images from the internet? Is this active x control an instance of IE? I think you ought to download the file to disk and then open it.

      There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

      S 1 Reply Last reply
      0
      • S sashoalm

        Is this control supposed to be able to load images from the internet? Is this active x control an instance of IE? I think you ought to download the file to disk and then open it.

        There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

        S Offline
        S Offline
        SIJUTHOMASP
        wrote on last edited by
        #3

        Hi Sashoalm, Thanks much for your reply. The control could load images from any unc path or local path (\\server\test\ab.bmp or c:\projects\test\ab.bmp). This is not an instance of IE. The image files are available in the server location. But if we store that to the client, the client machine will have all the files. My thought was like if the control could load the image from any virtual folder or url (server) then it would be much helpful. I have seen that the media player ,irfanview etc could able to load the image url in it.. Hence I believe it will be possible with the activex control written in vc++..Really appreciate if can show any way to do this. Thanks, Rahul.

        SoftwareDeveloper(.NET)

        1 Reply Last reply
        0
        • S SIJUTHOMASP

          HI, Is there any way to load image from a url. I have one activex control which has been used in the web application and the application will pass an UNC path to the control. From that path, the control will load the image. The activex control has been written in vc++/MFC. I need to load the image using the url. For eg: http://site/test.tiff. I have modified the code of the activex control and given the url, then it was failing with the error "assertion failure". My confusion is this, when I tried to open the image as url through IE, it could open, but when it is passed to the program it couldn't load. Will you please help and provide me the way if it is possible. Is there any way to load the image instead of passing the path and directly passing the imgage itself. Any idea why it couldn't load the image from url and only it is loading from UNC path. Thanks in Advance, Rahul.

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

          Is this[^] helpful?

          Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

          S 1 Reply Last reply
          0
          • H Hamid Taebi

            Is this[^] helpful?

            Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

            S Offline
            S Offline
            SIJUTHOMASP
            wrote on last edited by
            #5

            Hi Hamid, Thanks much for your reply..I will check this and let you know if that example works for me. Thanks, Rahul.

            SoftwareDeveloper(.NET)

            H 1 Reply Last reply
            0
            • S SIJUTHOMASP

              Hi Hamid, Thanks much for your reply..I will check this and let you know if that example works for me. Thanks, Rahul.

              SoftwareDeveloper(.NET)

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

              If my answer was helpul you can give me 5. :-D

              Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

              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