?
Solved

Loading language based menu during run time

Posted on 2003-03-11
5
Medium Priority
?
205 Views
Last Modified: 2013-11-20
Hi;
I am developing and application in (vc++ MDI CFormView)
different languages. My problem is how can I load menu
in during run time depending on the user selected language.

For example I have a menu called language. It has two sub menus
called Englisch and German. When User selects German from the menu it must store German menu in both forms. If he selects English It must display German menu.

Can you please help me to do this.
0
Comment
Question by:Ashik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 12

Expert Comment

by:williamcampbell
ID: 8112715
Then something like this

void CMainFrame::ReplaceMenu ( UINT uMenuID )
{
   // Load the new menu.
   m_NewMenu.LoadMenu ( uMenuID  );
   ASSERT ( m_NewMenu );

   // Remove and destroy the old menu.
   SetMenu ( NULL );
   ::DestroyMenu ( m_hMenuDefault );

   // Add the new menu
   SetMenu ( &m_NewMenu );

   // Assign default menu
   m_hMenuDefault = m_NewMenu.GetSafeHmenu();  
}

 ReplaceMenu ( IDR_GERMAN );
0
 
LVL 1

Expert Comment

by:keitha1
ID: 8162710
You could even make it automatic my setting the menu id to the CodePage number on the machine. I.E. 1033 for english.

0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11812486
PAQed - no points refunded (of 25)

modulo
Community Support Moderator
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month7 days, 20 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question