|
Hello everyone,
my application offers two languages: English and German. Upon application start the user can select one of those 2. To enable the language within Toolkit Pro, I do this:
CString toolkitResources = ProgrammVerzeichnis() + "\\daten\\"; if ( !IstLaendereinstellungEnglisch()) { toolkitResources += "ToolkitPro.ResourceDe.xml"; } else { toolkitResources += "ToolkitPro.ResourceEn.xml"; } CXTPResourceManager::m_managerInstance->SetResourceFile(toolkitResources); if ( !IstLaendereinstellungEnglisch()) CXTPResourceManager::m_managerInstance.GetData()->SetResourceLanguage(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN)); else CXTPResourceManager::m_managerInstance.GetData()->SetResourceLanguage(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK));
When adding new items to a property grid, the application crashes in random location within the memory. I debugged it down to this lines within the toolkit:
CXTPPropertyGridItemBool::_Init(BOOL bValue) (line 76):
if (XTPResourceManager()->LoadString(&strTrueFalse, XTP_IDS_PROPERTYGRID_TRUEFALSE) && (strTrueFalse.Find(_T('\n')) != -1))
I've digged through the documentation but I couldn't find any further information about the language handling and the SetResourceFile...
I've also tried to load the language file like this:
CXTPResourceManager::m_managerInstance->SetResourceManager(new CXTPResourceManagerXML(toolkitResources));
If I don't call "SetResourceFile" or "SetResourceManager" it doesn't crash but shows the local settings...
Thanks for your help.
|