Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to access a Template-specific menu?

1 view
Skip to first unread message

Mike Faynberg

unread,
Dec 4, 2009, 5:51:02 PM12/4/09
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
0 new messages