Solved

Settings new resource.

Posted on 2000-03-12
3
177 Views
Last Modified: 2013-11-20
In my project to adopt it it to europian languages,i am using dll of that respective languages,i.e. i am using all same resources ,with ids & evry thing ,only caption in that perticulat language.
I am loading DLL with LoadLibrary,
Setting those resouces with AfxSetResourceHandle.
Dll get loaded ,all dialog boxes works, but that main menu bar doesnt changle ,i used DrawMenuBar to redraw menubat,it doesn't work

thanks.
0
Comment
Question by:jaydeep
3 Comments
 
LVL 8

Expert Comment

by:VinExpert
ID: 2610738
Hi,

Just give it a try...

U get the menu resource handle in a CMenu.

Then use AfxGetMainWnd()->SetMenu(...);
And then use DrawMenu();

Try it out.

VinExpert
0
 

Accepted Solution

by:
TG earned 15 total points
ID: 2611487
Hi,
I thing it's work properly, but the problem is that you did not change Handle to Menu in the MainFrame, so you see old one menu.

If you want to see menu on the correspond language you must change menu handle in Mainframe with that one that you load from the new DLL.

Also you need to change all menu handles in all DocTemplates that you have in the application.

Do not forget to send message to active child that menu is changed( if this is a MDI ).

TG
0
 

Author Comment

by:jaydeep
ID: 2614757
Hi
i have tried forst option of setmenu  earlier it doesn't work.
Actually GetMenu returns the present active menu, so it return menu of view ,or you can say child.but don't know why it's not working.

Another question when we load resurces from DLL,  have copies same .rc file of apllication  & copied it to DLL .rc & i have just changed the captions.

can you suggest some other solution

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now