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. ATL / WTL / STL
  4. internationalization in ATL/WTL apps

internationalization in ATL/WTL apps

Scheduled Pinned Locked Moved ATL / WTL / STL
c++comhelpquestionlearning
4 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.
  • S Offline
    S Offline
    Sidney Chong
    wrote on last edited by
    #1

    Hi all, Recently I began work localizing my apps. My source of reference is the satdll sample found in MSDN (based on MFC however). I'm using _Module.SetResourceInstance() to point the app to my external resource dll and it seems to work as my built-in resouces are no longer used. However, the trouble is my new resources in the dll is not showing up as well (all my dialogs are skipped and message strings appear empty). I've made sure that my resource IDs are the same but I've set the language attribute to something other than English (e.g. my french res dll will have all resources specified as French (France)). Any advise/pointers is much appreciated. Cheers Sidney -------------------------------------------- Need help with your spelling in the forum? Check out ieSpell, spell checker addon for Internet Explorer.

    M 1 Reply Last reply
    0
    • S Sidney Chong

      Hi all, Recently I began work localizing my apps. My source of reference is the satdll sample found in MSDN (based on MFC however). I'm using _Module.SetResourceInstance() to point the app to my external resource dll and it seems to work as my built-in resouces are no longer used. However, the trouble is my new resources in the dll is not showing up as well (all my dialogs are skipped and message strings appear empty). I've made sure that my resource IDs are the same but I've set the language attribute to something other than English (e.g. my french res dll will have all resources specified as French (France)). Any advise/pointers is much appreciated. Cheers Sidney -------------------------------------------- Need help with your spelling in the forum? Check out ieSpell, spell checker addon for Internet Explorer.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      What do you mean by "built-in resources"? ATL 7 lets you have multiple modules that are searched for resources. If you're using VC6, you can only have one (that's what SetResourceInstance() does), so you'll need to use Win32 APIs and pass a HINSTANCE instead of using the resource loading wrappers. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

      S 1 Reply Last reply
      0
      • M Michael Dunn

        What do you mean by "built-in resources"? ATL 7 lets you have multiple modules that are searched for resources. If you're using VC6, you can only have one (that's what SetResourceInstance() does), so you'll need to use Win32 APIs and pass a HINSTANCE instead of using the resource loading wrappers. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

        S Offline
        S Offline
        Sidney Chong
        wrote on last edited by
        #3

        Sorry. My bad. I've managed to find my problem - it has to do with FreeLibrary getting called by a class destructor even before my dialog was displayed :( On a related note, anyone have experience using InitMUILanguage to change the language of the common controls? I just tried it with the French Language ID (0x0c0c) on a US English XP but its not working. I'm wondering if its due to : 1) my system not having the French language installed? (not likely as I'm under the impression that the default US English Windows XP includes most European language support) 2) I read in a newsgroup that InitMUILanguage must be called before AtlInitCommonControls? (I can't even find AtlInitCommonControls in my code!) Any advice is much appreciated! -------------------------------------------- Need help with your spelling in the forum? Check out ieSpell, spell checker addon for Internet Explorer.

        M 1 Reply Last reply
        0
        • S Sidney Chong

          Sorry. My bad. I've managed to find my problem - it has to do with FreeLibrary getting called by a class destructor even before my dialog was displayed :( On a related note, anyone have experience using InitMUILanguage to change the language of the common controls? I just tried it with the French Language ID (0x0c0c) on a US English XP but its not working. I'm wondering if its due to : 1) my system not having the French language installed? (not likely as I'm under the impression that the default US English Windows XP includes most European language support) 2) I read in a newsgroup that InitMUILanguage must be called before AtlInitCommonControls? (I can't even find AtlInitCommonControls in my code!) Any advice is much appreciated! -------------------------------------------- Need help with your spelling in the forum? Check out ieSpell, spell checker addon for Internet Explorer.

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          From this blog post[^]:

          The ironic part is that the Windows common controls do have a workaround for this issue, even though there do not seem to be many areas of localized text in them. If you look at the topic entitled Localization Support for the Common Controls, it talks about the InitMUILanguage function (which initializes the UI language for the common controls within a process) and the GetMUILanguage function (which retrieves the UI language for the common controls within a process, or the user UI language if it has not been set). In theory there is no reason why you could not call this function at any point, but in practice it is unclear from the documentation if it will work when set multiple times (hell, I am still having trouble picturing when it works at all, since I cannot think of any localized text!).

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

          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