Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Runtime resource change and menus Collapse All
Subject Author Date
Mario Gudelj Jan 30, 2006 - 10:25 AM

Hi,

We have recently upgraded from prof-uis 2.27 to 2.40 and a small problem has appeared.

We have an MDI app that supports runtime language switching. Each language has its own resource-only DLL. When changing languages, appropriate lanugage DLL is loaded, resource handle is set using AfxSetResourceHandle and resources are updated (e.g. MDI frame’s context menu and accelerator table, some strings in list and tree controls, etc.). This is also done on application startup.

This worked OK in 2.27, but in 2.40 there is a problem with the main menu bar. When switching languages, main menu bar strings are updated correctly. However, entries in the individual menus (e.g. ’File’ menu) are not updated. All other resources (dialogs, strings, popup menus) are updated properly. We didn’t change any code when upgrading from 2.27 to 2.40.

Is there a way to update menus?

The problem doesn’t appear on application startup.

Thank you,

Technical Support Jan 30, 2006 - 12:26 PM

Did you invoke the CExtMenuControlBar::UpdateMenuBar() method after reloading the language DLL? Besides, the last Prof-UIS versions allow you to keep all the resources in one module and avoid creating multiple DLLs.

Mario Gudelj Jan 31, 2006 - 1:56 AM

Found the problem. I wasn’t calling g_CmdManager->UpdateFromMenu for our menus (with both bool params set to true)