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. Managed C++/CLI
  4. .resX file question??

.resX file question??

Scheduled Pinned Locked Moved Managed C++/CLI
questionhelplearningworkspace
3 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.
  • R Offline
    R Offline
    richiemac
    wrote on last edited by
    #1

    Hi all, I've got an application that I've added language capabilties by means of resource files and cultures. This works ok and I have no problem with it what-so-ever. I now want to add another resource that holds all the images my application will use. My problem comes whenever I try to use the resource. My app complains about the images resource or when I manage to sort that problem it complains about the language resource. I have had both working on occasion but it seems to be very flakey and sometimes chooses not to work for no apparent reason other than the project being closed over night. Could someone explain to me the exact way in which to add .resX files to projects and what setting should be set in the project configuration because I think I may have misunderstood the process somewhere along the road. Thanks in advance. Richie

    U 1 Reply Last reply
    0
    • R richiemac

      Hi all, I've got an application that I've added language capabilties by means of resource files and cultures. This works ok and I have no problem with it what-so-ever. I now want to add another resource that holds all the images my application will use. My problem comes whenever I try to use the resource. My app complains about the images resource or when I manage to sort that problem it complains about the language resource. I have had both working on occasion but it seems to be very flakey and sometimes chooses not to work for no apparent reason other than the project being closed over night. Could someone explain to me the exact way in which to add .resX files to projects and what setting should be set in the project configuration because I think I may have misunderstood the process somewhere along the road. Thanks in advance. Richie

      U Offline
      U Offline
      ursus zeta
      wrote on last edited by
      #2

      I've been reading about this recently in Chris Sells book, "Windows Forms Programming in C#". He has a 30 page chapter on the subject in which he describes in detail how to embed resources into a .NET Framework executable. The process is a little different in C++, and. in all probability, depends on which version Visual Studio .NET you are using. If you haven't tried it already, what happens when you open the compiled executable in Ildasm.exe? The manifest should show your resources and the associated namespaces. This is from Chris's book: "To check that a file has been embedded properly into your project's output assembly, you can use the .NET Framework SDK tool ildasm.exe. This tool shows all embedded resources in the Manifest view of your assembly". Depending on the method that you used to embed the resource, he goes on to describe the process that Visual Studio .NET uses to assign the default namespace and the actual path to the resource. He also points out that building your project causes the .resx data to be embedded as nested resources, which are resources grouped into a named container. He then goes on to describe several methods for loading these resources. You don't say in your post, but, how are you attempting to access these resources?

      R 1 Reply Last reply
      0
      • U ursus zeta

        I've been reading about this recently in Chris Sells book, "Windows Forms Programming in C#". He has a 30 page chapter on the subject in which he describes in detail how to embed resources into a .NET Framework executable. The process is a little different in C++, and. in all probability, depends on which version Visual Studio .NET you are using. If you haven't tried it already, what happens when you open the compiled executable in Ildasm.exe? The manifest should show your resources and the associated namespaces. This is from Chris's book: "To check that a file has been embedded properly into your project's output assembly, you can use the .NET Framework SDK tool ildasm.exe. This tool shows all embedded resources in the Manifest view of your assembly". Depending on the method that you used to embed the resource, he goes on to describe the process that Visual Studio .NET uses to assign the default namespace and the actual path to the resource. He also points out that building your project causes the .resx data to be embedded as nested resources, which are resources grouped into a named container. He then goes on to describe several methods for loading these resources. You don't say in your post, but, how are you attempting to access these resources?

        R Offline
        R Offline
        richiemac
        wrote on last edited by
        #3

        Thanks for the pointer. I think it was to do with the project configuration. I went through it and changed it where required and it seems to be ok (for now...). I had to change the resource output file names in configuration. I now know to use the ildasm.exe to see if they are being embedded correctly. Thanks again. Oh and I was using the ResourceManager class to access them.

        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