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. CDHTMLDialog issue

CDHTMLDialog issue

Scheduled Pinned Locked Moved C / C++ / MFC
htmlhelpquestionlearning
5 Posts 2 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.
  • E Offline
    E Offline
    Emilio Guijarro
    wrote on last edited by
    #1

    When I create a DHTML-based dialog, and I add external resources to the HTML code (images, sounds, etc...), ¿where should I store these resources?, ¿how must be referenced form my html code? :wtf: I supose that putting them into the executable resource section is the best choice... but I don´t know hot to load them from HTML. :~ Thanks. :cool: "nobody knows it, but you´ve got a secret smile, and you use it only for me"

    S 1 Reply Last reply
    0
    • E Emilio Guijarro

      When I create a DHTML-based dialog, and I add external resources to the HTML code (images, sounds, etc...), ¿where should I store these resources?, ¿how must be referenced form my html code? :wtf: I supose that putting them into the executable resource section is the best choice... but I don´t know hot to load them from HTML. :~ Thanks. :cool: "nobody knows it, but you´ve got a secret smile, and you use it only for me"

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      I'm sure there's a better way, but i used a bit of javascript to compose the resource URLs:

      // set background image to jpeg stored in resources as "background.jpg"

      // determine base URL
      strBasePath = document.location.toString();
      strBasePath = strBasePath.substring(0, strBasePath.length-3);
      // set background
      document.body.background = strBasePath + "background.jpg";

      ---

      Shog9 Actually I use to find learning in bars when drinking really useful. It sort of makes a language liquid. - Colin Davies, Thinking in English?

      E 1 Reply Last reply
      0
      • S Shog9 0

        I'm sure there's a better way, but i used a bit of javascript to compose the resource URLs:

        // set background image to jpeg stored in resources as "background.jpg"

        // determine base URL
        strBasePath = document.location.toString();
        strBasePath = strBasePath.substring(0, strBasePath.length-3);
        // set background
        document.body.background = strBasePath + "background.jpg";

        ---

        Shog9 Actually I use to find learning in bars when drinking really useful. It sort of makes a language liquid. - Colin Davies, Thinking in English?

        E Offline
        E Offline
        Emilio Guijarro
        wrote on last edited by
        #3

        It doesn´t work! I´m still unable to display these images on my dialog, nor using the original file name "title.gif" or the resource index "106" . . . I´m confuse. :eek: Thanks. "nobody knows it, but you´ve got a secret smile, and you use it only for me"

        S 1 Reply Last reply
        0
        • E Emilio Guijarro

          It doesn´t work! I´m still unable to display these images on my dialog, nor using the original file name "title.gif" or the resource index "106" . . . I´m confuse. :eek: Thanks. "nobody knows it, but you´ve got a secret smile, and you use it only for me"

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #4

          How are you naming your resources? Make sure you include the name in quotes, or VS will give it a number instead. (yes, you can use a resource index, but i don't remember how off the top of my head. Use a name 'till you've got the kinks worked out.)

          ---

          Shog9 Actually I use to find learning in bars when drinking really useful. It sort of makes a language liquid. - Colin Davies, Thinking in English?

          E 1 Reply Last reply
          0
          • S Shog9 0

            How are you naming your resources? Make sure you include the name in quotes, or VS will give it a number instead. (yes, you can use a resource index, but i don't remember how off the top of my head. Use a name 'till you've got the kinks worked out.)

            ---

            Shog9 Actually I use to find learning in bars when drinking really useful. It sort of makes a language liquid. - Colin Davies, Thinking in English?

            E Offline
            E Offline
            Emilio Guijarro
            wrote on last edited by
            #5

            Yes, it works! Thanks. "nobody knows it, but you´ve got a secret smile, and you use it only for me"

            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