Print Page | Close Window

OnCreateCommandBar not working for tmaking earoffs

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=6229
Printed Date: 06 October 2024 at 12:54am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: OnCreateCommandBar not working for tmaking earoffs
Posted By: MichaelN
Subject: OnCreateCommandBar not working for tmaking earoffs
Date Posted: 25 January 2007 at 8:28pm
I am trying to setup tearoff popup menus and have hit a brick wall after spending hours on this. There are a number of strange problems:
 
OnCreateCommandBar() is not being called for all popups. Using AfxMessageBox() to show the comtrolbar caption, I can see that it is being called for the dropbutton popups on toolbars but *only* for the top level popups on the menubar. it is not called for anything below the menubar level.
 
I followed the source code in the sample app "Tear off popups". In that example, the lower level popups are called. But not so in my app! What am I not doing???
 
Another issue: This is an MDI app with multiple document types. Even though I call CXTPCommandBars::SetMenu() using other doc ID's, the OnCreateCommandBar() is only being called for the mainframe menu. And then, only for the top level popups on the menubar.
 
Michael
 



Replies:
Posted By: MichaelN
Date Posted: 25 January 2007 at 9:08pm
Here's another piece of the puzzle:
 
The app has multiple Doc types. When I open a document, the menubar does not change to the class menu. It *always* remains the mainframe menubar.
I DO NOT call SetFlag() to set any menu flags. In fact, if I do call it, there doesn't seem to be any effect for any of the flags.
 
Michael



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net