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