Print Page | Close Window

Menu Shortcut texts with version 9.80

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2995
Printed Date: 11 January 2026 at 5:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Menu Shortcut texts with version 9.80
Posted By: Uwe Keim
Subject: Menu Shortcut texts with version 9.80
Date 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




Replies:
Posted By: Oleg
Date 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


Posted By: Uwe Keim
Date Posted: 04 October 2005 at 7:51am
It works great. Thank you!


Posted By: Cedric
Date 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 ?


Posted By: Oleg
Date 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


Posted By: Cedric
Date 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
uploads/Cedric/2005-11-25_075416_Resource_fr.zip - 2005-11-25_075416_Resource_fr.zip

I create a new post for my http://forum.codejock.com/forum_posts.asp?TID=3280&PN=1 - problem


Posted By: Oleg
Date Posted: 26 November 2005 at 6:47am
Thanks!

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


Posted By: Cedric
Date Posted: 02 December 2005 at 9:45am
hi

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


uploads/Cedric/2005-12-02_094454_Resource_fr.zip - 2005-12-02_094454_Resource_fr.zip



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