-
March 13th, 2006, 09:32 AM
#1
Localization in Menu Bar
Hi All,
I am doing localization for my project so i have created a satelite dll and added all dialog control labels, menu labels and error msgs are added to the resource dll. I am able to do the dynamic label loading for everything else other than menu bar. Can i do the same for menus or not? I had a doubt as am passing the menu id to CDocMultiTemplate constructor, I will not be able to change the same after creating/opening a document. Please clarify.
Thanks in advance
Chitra
-
March 13th, 2006, 09:52 AM
#2
Re: Localization in Menu Bar
To modify the menu text at run-time you can call CMenu::ModifyMenu.
Example:
Code:
CMenu* pMenu = GetMenu();
if(NULL != pMenu)
{
pMenu->ModifyMenu(0, MF_BYPOSITION, -1, _T("Baba Safta"));
pMenu->ModifyMenu(1, MF_BYPOSITION, -1, _T("Baba Surda"));
pMenu->ModifyMenu(ID_TEST_TEST, MF_BYCOMMAND, ID_TEST_TEST, _T("Baba Novac"));
::DrawMenuBar(m_hWnd);
}
-
March 13th, 2006, 04:22 PM
#3
Re: Localization in Menu Bar
Can i do the same for menus or not?
FYI: if you use a product like Visual Localize , you don't have to worry about storing the menu strings. It can translate a standard menu resource.
Gort...Klaatu, Barada Nikto!
-
March 14th, 2006, 12:26 AM
#4
Re: Localization in Menu Bar
Thanks for your replies!
I am using ModifyMenu function only, I could set all the menu items with the text what ever i wanted to but the document loses it icon on its left side and the close/max/min buttons on its right side. Hope i explained properly.
Chitra
-
March 17th, 2006, 08:13 AM
#5
Re: Localization in Menu Bar
Any suggestion from any one?
-
March 17th, 2006, 08:24 AM
#6
Re: Localization in Menu Bar
Where should i do the Modify menu code? In OnOpenDocument and OnNewdocument methods only right?
Please calrify
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|