CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Posts
    515

    CString::LoadString() issue in Release build

    My Unicode project loads the correct strings in debug version (either English or Chinese based on settngs) but in release build it doesn't load the chinese strings. It displays them as questions marks like ????. I have simple test code to load a string.
    Code:
    	CString test;
    	test.LoadString( ID_FILE_NEW );
    	AfxMessageBox( test );
    The project settings are the same for debug and release build. The release build does show menu in Chinese but the LoadString() functions display only ????? marks.

    I think I can safely rule out fonts as debug version works fine and partially the release version as well. What could possibly be wrong?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: CString::LoadString() issue in Release build

    Where are the Chinese strings: in exe or dll?
    If you open this Release exe or dll in some Unicode editor - do you see Chinese texts or "????" ?
    Victor Nijegorodov

  3. #3
    Join Date
    Aug 2006
    Posts
    515

    Re: CString::LoadString() issue in Release build

    Quote Originally Posted by VictorN View Post
    Where are the Chinese strings: in exe or dll?
    If you open this Release exe or dll in some Unicode editor - do you see Chinese texts or "????" ?
    Chinese strings are in dll. I see the text fine in Chinese in Visual Studio editor. All the strings/resources are in the single .rc file. Moreover the menus load fine and are correctly displayed in Chinese but only whatever I load with LoadString() comes up as ????

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: CString::LoadString() issue in Release build

    Quote Originally Posted by zspirit View Post
    Chinese strings are in dll. I see the text fine in Chinese in Visual Studio editor. All the strings/resources are in the single .rc file. Moreover the menus load fine and are correctly displayed in Chinese but only whatever I load with LoadString() comes up as ????
    And if you load dll as a resource in VS - are the Chinese string OK?
    And if you open this Release exe or dll in some Unicode editor - do you see Chinese texts or "????" ?
    Victor Nijegorodov

  5. #5
    Join Date
    Aug 2006
    Posts
    515

    Re: CString::LoadString() issue in Release build

    My bad! I thought I checked it many time yet release project settings were Multibyte instead of Unicode! that change fixed it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured