Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - OnCreateCommandBar not working for tmaking earoffs
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

OnCreateCommandBar not working for tmaking earoffs

 Post Reply Post Reply
Author
Message
MichaelN View Drop Down
Senior Member
Senior Member


Joined: 19 September 2006
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote MichaelN Quote  Post ReplyReply Direct Link To This Post Topic: OnCreateCommandBar not working for tmaking earoffs
    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
 
Back to Top
MichaelN View Drop Down
Senior Member
Senior Member


Joined: 19 September 2006
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote MichaelN Quote  Post ReplyReply Direct Link To This Post 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
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.125 seconds.