Re: Docking toolbars side by side in an MDIChildFrame
The toolbars dock on two rows rather than side by side; the same code works fine when I put the toolbars on the main mdi frame, just not for the child frame.
Re: Docking toolbars side by side in an MDIChildFrame
Debug the code you are using for child frame toolbars and compare its behaviour with the one used for mainframe toolbars.
Note that by design toolbars consider to belong to the mainframe window!
Re: Docking toolbars side by side in an MDIChildFrame
I followed the code through but as far as I can tell they do the same thing. Obviously, that isn't the case, but I am having trouble finding it.
I've uploaded the file to http://privatepaste.com/a20QHmz7CG so perhaps you can take a look and give me a hint where to look. The link will be available for the next month.
I did notice that only the split window results in the docking code reaching the statement where it "adds to the current row"...but that comment is the opposite of what I'm seeing, so it may just be a red herring.
And why don't you want to attach your ptoject to your post in this thread?
Pack it in zip archive (not including Debug/Release folders nor .ncb/.aps/.opt files) and attach! (have a look at the Manage Attachments button in Additional Options section (under the message window)
Re: Docking toolbars side by side in an MDIChildFrame
Originally Posted by rioch
I have an mdi application where the mdi child frame has two toolbars.
Well your application in NOT a *mdi* one! It is an SDI app with one of the "views" being derived from CFrameWnd rather than CView class.
And there is only one document is allowed (you are using CSingleDocTemplate).
Re: Docking toolbars side by side in an MDIChildFrame
The same toolbar ID (AFX_IDW_TOOLBAR) is used in MainFrm and it works fine there. Plus, if I use unique ids in SplitFrame (AFX_IDW_TOOLBAR+n) I still get the same problem.
Re: Docking toolbars side by side in an MDIChildFrame
My point was, the toolbars still appear next to one another. Are you saying that if I use different toolbar resource ids and different AFX_IDW_TOOLBAR ids, it will work?
Re: Docking toolbars side by side in an MDIChildFrame
Originally Posted by rioch
... Are you saying that if I use different toolbar resource ids and different AFX_IDW_TOOLBAR ids, it will work?
No, I am not.
Your design is not a standard one, I never had such types of child windows (derived from CFrameWnd and having toolbars), so I don't know where the main problem is. But anyway, you must first fix all already obvious bugs in your implementation.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.