Print Page | Close Window

"Customize..." disappears

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=7428
Printed Date: 21 November 2024 at 12:00pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: "Customize..." disappears
Posted By: farr02
Subject: "Customize..." disappears
Date Posted: 22 June 2007 at 7:02am
Hi,
in my application I have a funny problem with the "Customize..." field in my CommandBars. It disappears when switching the language (between german and english). Look at the following images to see what I mean:
german version:

english version:


Has anyone a hint what goes wrong in my application? (I also checked the MultiLanguage sample but it didn't help.)

Best regards,
   Holger Farr

BTW: I use CodeJock XTP 9.81 with Visual Studio 6.0.





Replies:
Posted By: Oleg
Date Posted: 22 June 2007 at 1:28pm
Hi,
How do you switch language?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: farr02
Date Posted: 25 June 2007 at 10:46am
Hello Oleg,

I use the following codefragment for language switching:

WORD lang = 0;
switch(language) {
case 0:
    lang = LANGIDFROMLCID(userDefault);
    break;
case 1: // english
    lang = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US);
    break;
case 2: // german
    lang  = MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN);
    break;
default: // unknown value -> keep language setting
    lang = 0;
    break;
}
if (lang != 0)
{
    const DWORD lcid = MAKELCID(lang, SORT_DEFAULT);
    ret = ::SetThreadLocale(lcid) != 0;
}

After that I reload the menu and the command bars:

m_MenuStandard.DestroyMenu();
m_MenuStandard.LoadMenu(IDR_MENUSTANDARDTYPE);
FixMenuAfterLoading(); // avoids removal of menu
UpdateMenu(); // updates the menu entries

int nTBNr = 0; // index of toolbar
for (int i = 0; i < pCommandBars->GetCount(); i++)
{
    CXTPToolBar* pToolBar = pCommandBars->GetAt(i);
    if (pToolBar->IsBuiltIn())
    {
        if (pToolBar->GetType() != xtpBarTypeMenuBar)
        {
            pToolBar->LoadToolBar(s_toolbarInfo[nTBNr].iToolbarID);
            ++nTBNr;
        }
    }   
}

That's all.
Bye
   Holger



Posted By: Oleg
Date Posted: 26 June 2007 at 1:07am
Hi,
 
How do you add german toolkit langauge? try to modify our sample with same code and attach it here.
 
btw I very recommend you update your toolkit - with enabled Actions , you will be able to switch language for toolbars and menus without reset them - all user customization will be preserved.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: farr02
Date Posted: 27 June 2007 at 2:07am
> How do you add german toolkit langauge?
Hi Oleg,

that was the solution, because someone has commented the "#include" statement for the corresponding resource file (and source-safe told, it was not me ). After removing the comment language switching works and I get the "Anpassen..." field.

Thanks a lot
   Holger

PS: I will try the current version.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net