
Dynamically changing menus in an MDI application
I'm developing an MDI application where multiple users can access each
document. However, the users
can be members of one of two groups, each of which allow the user to do
different things with the application.
The problem is that I want to switch menus when the user logs and switch
back to the previous (logon menu)
when the user logs off. So, I created two different menus for each kind of
user, the first of which is IDR_MAINFRAME (of course I really made four
menus, one more each for the menu with the window item).
But if I set the second menu, when the user loads a document, or when it
closes it switchs back to the other
level user menu.
So, I'd like to know how should I set up the menus correctly or which events
should I capture in order to have
this accomplished.
Thanks,
PS: I think that editing the menus dinamically is not an option as both
menus are two different to have to
make one by means of the other. Moreover, when it switchs to the menu with
the window item, I should have
to dynamically set it again.