Mike Faynberg
unread,Dec 4, 2009, 5:51:02 PM12/4/09You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello,
I have an MDI application, which uses several templates - and, as a result,
has an IDR_MAINFRAME main menu (when there is no open document) as well as
menus for each template specified in the calls to CMultiDocTemplate()
constructors. Actually, these "template" menus are all the same, but
different from the IDR_MAINFRAME.
I want to change the template-based menu upon some events (starating with
the initial opening a document), but it looks like I do not know how to get a
CMenu pointer (or a handle) to it... Calling GetMenu() for mainframe returns
the pointer to the IDR_MAINFRAME instance - but not a single window on the
stack returns a pointer to the template menu.
Could anyone explain how to access these menus? I am using VS2008 (and - for
the backward compatibility, VC6).
Thank you in advance,
Mike