Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - GetActiveDocumentID Event Not Firing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

GetActiveDocumentID Event Not Firing

 Post Reply Post Reply
Author
Message
cradke View Drop Down
Groupie
Groupie


Joined: 14 August 2007
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote cradke Quote  Post ReplyReply Direct Link To This Post Topic: GetActiveDocumentID Event Not Firing
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 August 2007 at 2:07am
Hello,
 
Please send request to support@codejock.com.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.