CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Changing Languages

    Does anyone knows how can i change the system current language, so that in an edit box i won't have to press Alt+Shift ? If there is someone out there, who knows an API function or whatever that can help me (and an example would be nice, too), I'd be the happiest programmer on earth.


  2. #2
    Join Date
    Jun 1999
    Location
    Germany
    Posts
    343

    Re: Changing Languages

    Hi,
    the way to change languages is very simple (if you know how!).
    The princip is to create Extension Resource - DLLs, that contain all resources in the specific language.
    -> For each language one Resource DLL.
    In InitInstance of your application, you have to decide which language is to set an than load your
    extension DLL.
    The resources in the Extension DLL must be same as in your application -
    a copy of the .rc file and the resource.h is necessary -> Then you can edit all resources to translate them.

    BOOL CMyApp::InitInstance()
    {
    //...
    switch(language)
    {
    case GERMAN:
    HINSTANCE hInst=LoadLibrary("..\\ResExample\\debug\\ResExample.dll");
    AfxSetResourceHandle(hInst);
    //...




    To show you the whole code, will take too much, but if you want a real demo application
    reply your e-mail address to [email protected]
    -> I'll send you a zip - file
    Good luck
    Gerd


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