Switching Menus in dialog based appliaction at runtime
Posted on 2000-02-10
I'm writing an vc++ application that support 4 languages (user may change it at runtime).
I solved this for dialogs, string tables and other ressources by creating a separate resource dll for all four languages. When the user changes the language, the applicable dll is loaded and all resources are used from this dll.
The problem is, that this doesn't seem to work with menus. I need some advice (best with source code fragments) on how to switch menus (not modifying) from one ressource to another.
Second problem is that if I try to load another menu with
hMyMenu = LoadMenu(tmp->GetResHandle(), "IDR_MAIN_MENU\r\n"); or hMyMenu = LoadMenu(tmp->GetResHandle(), MAKEITRESOURCE(IDR_MAIN_MENU));
I always get back a NULL pointer.
tmp->GetResHandle() returns a handle to the active resource dll and it works fine to load string table entries with LoadString(...).
Does anyone have a good suggestion to this problem