GetActiveDocumentID Event Not Firing |
Post Reply |
Author | |
cradke
Groupie Joined: 14 August 2007 Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 14 August 2007 at 5:44pm |
I am using the CommandBars ActiveX control in an MDI (non-MFC) C++ app. The app has multiple document types that each have a different menu to be displayed when active. The problem is that the GetActiveDocumentID event is not getting fired when a new document is added or an existing document is activated and therefore I can’t set the proper document specific menu. This is the case when either the document's window is clicked or the document's associated tab in the TabWorkspace is clicked. The event does get called when the app closes and when the Customize dialog is closed if the Menus page has been selected. In this second case I can successfully switch the menu from the default to one of my document menus. I used the IMenuBarMDIMenus collection obtained from the ActiveMenu to add my menubars for the various document types. These menus correctly show up in Customize dialog on Menus page. The rest of my code was taken from the CommandBars\WTL\WTLSample project. My questions for getting this show-stopper working are as follows. Is there a way to force the GetActiveDocumentID event to be fired? Is there an alternate way to swap the menus without losing the ability to customize them? (e.g. GetActiveMenu()->Delete(), m_spCommandBars->AddMenu()) Could you provide a WTL MDI sample that shows this working? Sincerely, Christopher Radke Applied Wave Research |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Please send request to support@codejock.com.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |