Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Language switching Collapse All
Subject Author Date
Artur Shingirei Dec 16, 2004 - 11:04 AM

Hello

I have a dialog based application.
I use the CExtResizableDialog as base class for my CMainDlg class.
But I have troubles with reloading Accelerators and Child Dialogs after I will switch language.
ToolBars and Menu I updated Ok, but then I calling some modal dialog after I change the language, always loading dialog which language has been set
at OnInitDialog() of main dialog.


void CMainDlg::OnInitDialog()
{
.....
switch(nId))
    {
    case 1033:
        g_ResourceManager->SetLangIdDesired( 1033 );
        break;
    case 1049:
        g_ResourceManager->SetLangIdDesired( 1049 );
        break;
    ...
    }
...
}
...
void CMainDlg::OnButton()
{
    CMyDlg dlg;
    dlg.DoModal();
}

How I can reload all resources(Accelerators,String Tables,etc ) for Dialog based application after language switching?

Technical Support Dec 17, 2004 - 11:17 AM

Dear Artur,

If you use methods of the CExtResourceManager class to load resources and the CExtResDlg or CExtResizableDialog classes as the base classes for your dialogs, you should not encounter any problems with loading the resources of a particular language. Of course, if your application keeps in memory some accelerator tables or string data, then you should reload them with the resource manager (i.e. accelerator tables should be destroyed and created again by calling g_ResourceManager->LoadAccelerators). Please check this in your application. Of course, you may always send us a test project and we will resolve the problem immediately.