Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - MDI menu and toolbar Approach
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MDI menu and toolbar Approach

 Post Reply Post Reply
Author
Message
skemp@docucorp View Drop Down
Newbie
Newbie


Joined: 08 August 2006
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote skemp@docucorp Quote  Post ReplyReply Direct Link To This Post Topic: MDI menu and toolbar Approach
    Posted: 15 August 2006 at 6:30pm

We are a new customer trying to fit your framework into an existing product and I’d like some advice as to a good approach to take with our toolbars and menus.  Our product is a “Studio” type application that is made up of several DLLS that are loaded dynamically; these DLLs may register one or more document templates with the application.  Each has its own menu and toolbar.  The current system loads and dynamically updates the main menu.  It loads the main toolbar and it loops through all registered entities and loads their toolbars with the auto-delete style turned on.  When a document is activated, the appropriate toolbar is shown to the side of the main toolbar.  So, the docking state of the main toolbar is the only state saved in this current solution, and all the MDI document toolbars just use that state when it is their time to appear.

 

With your framework, I have gotten the main menu and the MDI document menus working.  But I was unsure about a good toolbar approach.  I would really like to provide customization to these menus and toolbars.  With a quick test of the customization, I was able to add more items by calling AddCategories() with each of my document template’s toolbar ID.  However, duplicates do appear for each menu added so that approach will need some work if pursued. 

 

I was looking at the MDI Menus sample and was considering whether I need to dynamically build an all inclusive menu and toolbar as things are registered.  It appears that there is an AssignDocTemplate that may be able to be used.  But I am not sure if it is cumulative, meaning several document templates may be able to be tied to the items.  Additionally, I was not sure if that also would work for toolbars.  Your menu and toolbars do not really map to the MFC controls for them so there is a bit of a learning curve.

 

Management is excited about the Ribbon interface they have seen and they will want some sort of move to it sometime down the line.  My initial approach was to see if I could lay your Framework in and replace some of our own home grown solutions.  But if it makes sense to consider Ribbons now or take a certain track to make that transition easier, please advise with that too.

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 23 August 2006 at 11:38am
Hi,
Did you receive sample in issue track?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
skemp@docucorp View Drop Down
Newbie
Newbie


Joined: 08 August 2006
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote skemp@docucorp Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2006 at 4:04pm

I did get a sample MDI application from you at one point, but it did not include examples of what we're asking.

Specifically, we have a large multi-document type application. Just for example, assume one document is an XML tree. One document is a Bitmap Editor. And a third document is a word-processor.  (In fact, we have about 9 different document types.) These document managers are all part of the same application and the user can have multiples of each type open at once.
 
Prior to the attempt of moving to your framework, we had this nicely setup where the individual documents only had to declare the portion of the toolbar and menu that was different from the main menu. Then as the user switched between documents, the menu and toolbar would dynamically change (and merge, if necessary) to reflect the appropriate set of options for that document manager selected.
 
In your framework, we're having trouble getting this concept to play especially where the toolbar is concerned.  At present, we fallen back to the position of trying to make one all encompasing toolbar and then disable / hide buttons when switching the document types. We were hoping for some better suggestion.
 
 
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 23 August 2006 at 4:45pm
Hi,
 
Sample I attached (Documaker.zip ) is prototype for 2 document types and show how to show/hide toolbar, show/hide controls for special template....
 
Try to open some document types and you will see new controls/toolbars.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
skemp@docucorp View Drop Down
Newbie
Newbie


Joined: 08 August 2006
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote skemp@docucorp Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2006 at 4:55pm
Thanks. I will take a look at this.
 
SEK
Back to Top
skemp@docucorp View Drop Down
Newbie
Newbie


Joined: 08 August 2006
Location: United States
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote skemp@docucorp Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2006 at 2:39pm

Thanks for the code.  I had gotten a lot of things going by programmatically adding to the toolbars when initializing the application, but I see some things in you sample that I will go back and revisit.  Right now I am letting the MDI menus switch, but your approach may be better longer term.  I’m still not completely happy with my customization dialog but I will revisit that later.

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.063 seconds.