![]() |
OnCreateCommandBar not working for tmaking earoffs |
Post Reply ![]() |
Author | |
MichaelN ![]() Senior Member ![]() Joined: 19 September 2006 Status: Offline Points: 112 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
MichaelN ![]() Senior Member ![]() Joined: 19 September 2006 Status: Offline Points: 112 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
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 |