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-files in VC++.net 2002

resx-files in VC++.net 2002

Scheduled Pinned Locked Moved Managed C++/CLI
csharpquestionc++
3 Posts 2 Posters 5 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.
  • V Offline
    V Offline
    VizOne
    wrote on last edited by
    #1

    Hi! I'd like to use localized resources in my managed C++ project. The System that is available in e.g. C# (resx - localized satelite dlls) is exactly what I am looking for, so it would be nice to use it. However, vc++.net 2002 does not seem to support this natively. I can only add the "good ol'" .rc files. How can I use resx files in my project? Do I have to write them manually, precompile them with resgen and then link them manually to my mc++ code? Will VC++.net 2003 support resx-files natively? Thanks in advance. Andre (VizOne) Loker

    P 1 Reply Last reply
    0
    • V VizOne

      Hi! I'd like to use localized resources in my managed C++ project. The System that is available in e.g. C# (resx - localized satelite dlls) is exactly what I am looking for, so it would be nice to use it. However, vc++.net 2002 does not seem to support this natively. I can only add the "good ol'" .rc files. How can I use resx files in my project? Do I have to write them manually, precompile them with resgen and then link them manually to my mc++ code? Will VC++.net 2003 support resx-files natively? Thanks in advance. Andre (VizOne) Loker

      P Offline
      P Offline
      Paul Selormey
      wrote on last edited by
      #2

      VizOne wrote: Will VC++.net 2003 support resx-files natively? To tell the truth ;P, the only serious MC++ project I am working on is only in VS.NET 2003. Due to problems in the VS.NET 2002, I moved quickly to the VS.NET 2003 before management could even decide :laugh: I cannot remember dealing with resource files under the VS.NET 2002, but with VS.NET 2003 the support is there even though not as straight as C# where you set it in the File Property Page. You have to use the Project property page to visually set the /ASSEMBLYRESOURCE flag for the file. You will get a list box, where you can list all the resource files. In fact, you cannot do a complete .NET project without the commandline tools, whether in MC++ or C# - do not know if this will improve. So, make maximum use of the pre/post build process to set this once for your project where needed. Check the C# QuickStart tutorial on resources, it uses the commandline tools through the pre/post build options. Best regards, Paul. Jesus Christ is LOVE! Please tell somebody.

      V 1 Reply Last reply
      0
      • P Paul Selormey

        VizOne wrote: Will VC++.net 2003 support resx-files natively? To tell the truth ;P, the only serious MC++ project I am working on is only in VS.NET 2003. Due to problems in the VS.NET 2002, I moved quickly to the VS.NET 2003 before management could even decide :laugh: I cannot remember dealing with resource files under the VS.NET 2002, but with VS.NET 2003 the support is there even though not as straight as C# where you set it in the File Property Page. You have to use the Project property page to visually set the /ASSEMBLYRESOURCE flag for the file. You will get a list box, where you can list all the resource files. In fact, you cannot do a complete .NET project without the commandline tools, whether in MC++ or C# - do not know if this will improve. So, make maximum use of the pre/post build process to set this once for your project where needed. Check the C# QuickStart tutorial on resources, it uses the commandline tools through the pre/post build options. Best regards, Paul. Jesus Christ is LOVE! Please tell somebody.

        V Offline
        V Offline
        VizOne
        wrote on last edited by
        #3

        Hi Paul! I solved my problems and (as you said) use the command line tools. 1. I add the resource files (resx and txt for strings) and the localized versions to the project. 2. For the neutral resource, I set resgen $(InputFileName) $(InputName).resources as the commandline and "$(InputName).resources" as the output file 3. For all localized resources I set the command line to e.g. resgen $(InputFileName) $(InputName).resources al /v:1.0.* /target:lib /embed:$(InputName).resources /culture:de /out:$(OutDir)/de/$(TargetName).resources.dll and $(OutDir)/de/$(TargetName).resources.dll as the output file to create the satelite assemblies. 4. In the project settings Linker->Input->Embed managed resource file I add strings.resource That's it, works sweetly for me, although it is not as easy as it could be. Why does MS stick to .rc/.res in VC++.net 2002? - Andre

        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