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 General Discussion » Prof UIS applicatio localization Collapse All
Subject Author Date
Eugen Rata Jul 8, 2009 - 1:36 PM

Hi

How to tell Prof UIS library do NOT user current regional settings for layout and currency settings, but instead always use English format?

Thx

Eugen Rata Jul 9, 2009 - 5:04 PM

I have such a code in my App::InitInstance() method

if(!g_PaintManager.PaintManagerStateLoad(pApp->m_pszRegistryKey, pApp->m_pszProfileName, pApp->m_pszProfileName))
g_PaintManager.InstallPaintManager(RUNTIME_CLASS(CExtPaintManagerOffice2007_R2_LunaBlue));
    g_ResourceManager->AllowCustomLang(true);    
    g_ResourceManager->SetLangIdDesired(__EXT_MFC_LANG_ID_ENGLISH_US);

    MainDlg dlg;
    m_pMainWnd = &dlg;
    INT_PTR nResponse = dlg.DoModal();

The program crashes at DoModal() call.
If I comment the 2 lines you told me, than everything works fine. Do I need something else to do in the project?

Thx

P.S. Using Prof UIS 2.8.2, under VS 2008 with Win 7 x64 RC. Program compiled as x86.

Technical Support Jul 10, 2009 - 1:58 PM

Please check the language of your dialog template resource used by the MainDlg class. It should be English US. Otherwise Prof-UIS will not be able to load it.

Technical Support Jul 9, 2009 - 12:11 PM

You should invoke the following code before creating any Prof-UIS controls:

g_ResourceManager->AllowCustomLang( true );
g_ResourceManager->SetLangIdDesired( __EXT_MFC_LANG_ID_ENGLISH_US );