Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - "Customize..." disappears
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

"Customize..." disappears

 Post Reply Post Reply
Author
Message
farr02 View Drop Down
Groupie
Groupie


Joined: 10 May 2005
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote farr02 Quote  Post ReplyReply Direct Link To This Post Topic: "Customize..." disappears
    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.


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 22 June 2007 at 1:28pm
Hi,
How do you switch language?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
farr02 View Drop Down
Groupie
Groupie


Joined: 10 May 2005
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote farr02 Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
farr02 View Drop Down
Groupie
Groupie


Joined: 10 May 2005
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote farr02 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.