i have an not Unicode MFC Application, programmed in Visual Studio 2010 with C++. For translating my software, i have extraced all the resources into a resource -dll. This dll is translated with a tool, visual localize, to russian language i.e.. .
I load the dll with
Most parts work well, but some text is displayes as ???? only. I reduced the problem to text, that is loaded from the resource with
csTmp.Format( IDS_STRING246 );
this results in the wrong text.
Can anybody give me a clou, what is wrong with this concept or how to get the correct behavior. Opening the dll in Visual Studio, the text entries are translated correctly.
... the "Hello World!" does not appear in the dll so my client cannot translate it.
What do you mean by "does not appear in the dll"?
It cannot appear there automatically, it is you who has to put this text in the dll string table!
After you put ii in the string table you should use CString::LoadString to load it in the CString object.
Please, show your actual code that icludes loading the string and using it to be shown in UI!
And please, stop posting some pseudo code patterns, especially because they are different in your every new post.
The default conversion from wide char to MBCS is done using WideCharToMultiByte API which first paramaeter (CodePage ) defines how to convert.
ATL CString uses _AtlGetConversionACP() function to obtain the CodePage and the return value seems to not correspond the page you need to the proper conversion. See details here
i finally found out, it was not a coding problem, but a problem in the settings of Windows. With the correct settings and the russian language installed correctly, the dialogs are displayed correct and also the messages load correct. Either with Format or LoadString.