Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Menu Shortcut texts with version 9.80
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Menu Shortcut texts with version 9.80

 Post Reply Post Reply
Author
Message
Uwe Keim View Drop Down
Newbie
Newbie


Joined: 01 November 2004
Location: Germany
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Uwe Keim Quote  Post ReplyReply Direct Link To This Post Topic: Menu Shortcut texts with version 9.80
    Posted: 04 October 2005 at 4:49am

I just upgraded from 9.7 to 9.8.

Now suddenly all GUI was english. So I added the following in my Application::InitInstance (which was not needed prior to 9.8 ???):

XTPResourceManager()->SetResourceHandle( XtpResourceDLL )

With XtpResourceDLL being loaded by myself, e.g. "ToolkitPro.ResourceDe.DLL".

Everything is now in German, but the menu shortcut texts (like e.g. "Ctrl+A") are still in English (In German, it would be spelled "Strg+A").

Question: Am I doing something wrong when loading the resources?

Thanks
Uwe

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 04 October 2005 at 5:39am

Here code you can use:

class CLocalisedShortcutManager : public CXTPShortcutManager
{
public:
CLocalisedShortcutManager(CXTPCommandBars* pCommandBars)
: CXTPShortcutManager(pCommandBars)
{

}

CString GetKeyNameText(UINT uiVirtKey)
{
if (uiVirtKey == VK_CANCEL)
return CXTPShortcutManager::GetKeyNameText(uiVirtKey);

#define BUFFER_LEN 50
TCHAR szBuffer[BUFFER_LEN + 1];
ZeroMemory(szBuffer, BUFFER_LEN);

UINT nScanCode = ::MapVirtualKeyEx (uiVirtKey, 0,
::GetKeyboardLayout (0)) << 16 | 0x1;

if (uiVirtKey >= VK_PRIOR && uiVirtKey <= VK_HELP)
{
nScanCode |= 0x01000000;
}

::GetKeyNameText (nScanCode, szBuffer, BUFFER_LEN);

CString strKey = szBuffer;

if (!strKey.IsEmpty())
{
strKey.MakeLower();

for (int i = 0; i < strKey.GetLength(); i++)
{
TCHAR c = strKey;
if (IsCharLower (c))
{
strKey.SetAt (i, CXTPShortcutManager::ToUpper(c));
break;
}
}

return strKey;
}

return CXTPShortcutManager::GetKeyNameText(uiVirtKey);
}

};


usage:

pCommandBars->SetShortcutManager(new CLocalisedShortcutManager(pCommandBars));

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Uwe Keim View Drop Down
Newbie
Newbie


Joined: 01 November 2004
Location: Germany
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Uwe Keim Quote  Post ReplyReply Direct Link To This Post Posted: 04 October 2005 at 7:51am
It works great. Thank you!
Back to Top
Cedric View Drop Down
Newbie
Newbie


Joined: 27 October 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cedric Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2005 at 5:26pm
Hello I 've the same problem. I load the dll files but the tooltips "Toolbar options" appear in english not in french, And the message for re-assign key si still in english not in french

How can I hanlde this ?
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 25 November 2005 at 2:41am

Hello,

Unfortunally XTP_IDS_CONFIRM_REASSIGN not translated in

Source\CommandBars\res\Resource_fr.rc

 

please translate it manually and rebuild dll (to compile Workspace\Resource\ResourceFr\ResourceFr.dsp)

You help us a lot if you review franch translation and attach changed rc :)

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Cedric View Drop Down
Newbie
Newbie


Joined: 27 October 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cedric Quote  Post ReplyReply Direct Link To This Post Posted: 25 November 2005 at 7:54am
Ok i review french translation.

I changed those ID

XTP_IDS_CONFIRM_REASSIGN
XTP_IDS_CONFIRM_UPDATE

XTP_ID_WORKSAPCE_MOVEPREVIOUS
XTP_ID_WORKSAPCE_MOVENEXT
XTP_ID_WORKSAPCE_NEWHORIZONTAL
XTP_ID_WORKSAPCE_NEWVERTICAL

and i attach .rc file
2005-11-25_075416_Resource_fr.zip

I create a new post for my problem
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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 November 2005 at 6:47am
Thanks!
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Cedric View Drop Down
Newbie
Newbie


Joined: 27 October 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cedric Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2005 at 9:45am
hi

i found an error in my rc file. I put an other rc with the fix.


2005-12-02_094454_Resource_fr.zip
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.063 seconds.