MDI in a splitter pane???
Krassimir Belakov -- k.belakov@dea.it Tuesday, October 08, 1996 Environment: VC++ 4.2, Win95 I followed the discussion about one doc & multiple views. Here is my problem: I'm trying to create an app with 2 workspaces, which act as panes in a splitter window. The left pane is CTreeView, but the right one is MDI, where every child is a view of the same document. (Something like VC++ IDE, but without docking : Project Workspace (left pane) & InfoViewer(right pane)). Any suggestions about the architecture? I thought about: - MDI app with resizable control bar; - MDI app with "special" child window, which is always left-docked; - SDI app with splitter, which right view in some way is MDI client window; Is there a way to use CMDIFrameWnd as a pane in a splitter? Thanks, Krassimir
Si Cruse -- scruse@csfp.co.uk Thursday, October 10, 1996 [Mini-digest: 2 responses] Krassimir Belakov wrote: > > Environment: VC++ 4.2, Win95 > > I followed the discussion about one doc & multiple views. Here is my > problem: > I'm trying to create an app with 2 workspaces, which act as panes in a > splitter window. The left pane is CTreeView, but the right one is MDI, > where every child is a view of the same document. > (Something like VC++ IDE, but without docking : Project Workspace > (left pane) & InfoViewer(right pane)). > I spent a long time working on this... It is not trivial. My solution was to buy the Stingray Objective Toolkit which provides this functionality & much more besides by giving you a set of MFC extension classes. Take a look at http:\\www.stingsoft.com -- ...A closed mouth gathers no foot... _____________________________________________________________ Si Cruse Front Office IT Development, Credit Suisse Financial Products 1 Cabot Square, London E14 4QJ Phone: +44 171 516 2948 Fax: +44 171 516 2688 mailto:scruse@csfp.co.uk -----From: "Serge Wautier"I think the solution lies, as you say, in adding a custom (derived-) control bar with CTreeCTrl or CTreeView in it ( and a splitter on its right side. You'll have to handle this splitter yourself). MDI child frames reside in the client area of their MDI parent frame. So if you want to put children in the splitter pane, you'll have first to put the MDIClient window in the pane. I don't think this is the easiest solution since you'll have to handle resizing of the MDI client yourself... and prevent the frame to resize it as he wants. On the other hand, control bars handle MDI client resizing for you. The fastest solution is Objective Toolkit from Stingray. Check out http://www.stingsoft.com but i guess by the time i post this answer, Scott has already put his own ad ;) Hope this helps. Serge Wautier, Techno Trade s.a. Belgium ----------
Dimitry Gorokhovik -- gorokhov@cmm.ensmp.fr Friday, October 11, 1996 > [Mini-digest: 2 responses] > -----From: "Serge Wautier"[snip] > MDI child frames reside in the client area of their MDI parent frame. So if > you want to put children in the splitter pane, you'll have first to put the > MDIClient window in the pane. I don't think this is the easiest solution > since you'll have to handle resizing of the MDI client yourself... and > prevent the frame to resize it as he wants. This particular proposition wouldn't work, since an MDI child window expects its parent, the MDI client window, to be an immediate children an MDI parent window which must have a valid menu. In a case of the contrary, ::BringWindowToTop() called to activate the first MDI child, breaks (I suppose it happens when tries to update the menu of the MDI Frame and finds there the window ID instead). Otherwise, it wouldn't be that difficult IMHO to implement the custom resize for MDI client. It would do to change its ID to exclude it from the usual ResizeBars() procedure. > Hope this helps. > > Serge Wautier, > Techno Trade s.a. > Belgium > > ---------- Dimitri Gorokhovik Center of Mathematical Morphology / Paris School of Mines gorokhov@cmm.ensmp.fr fax: +33 1 64 69 47 07 voice: +33 1 64 69 47 62
T.K.Wessing -- tkw@xs4all.nl Wednesday, October 16, 1996 ---------- > From: Krassimir Belakov> To: mfc-l > Subject: MDI in a splitter pane??? > Date: Tuesday, October 08, 1996 4:19 PM > > Environment: VC++ 4.2, Win95 > > I followed the discussion about one doc & multiple views. Here is my > problem: > I'm trying to create an app with 2 workspaces, which act as panes in a > splitter window. The left pane is CTreeView, but the right one is MDI, > where every child is a view of the same document. > (Something like VC++ IDE, but without docking : Project Workspace > (left pane) & InfoViewer(right pane)). > > Any suggestions about the architecture? > I thought about: > - MDI app with resizable control bar; > - MDI app with "special" child window, which is always left-docked; > - SDI app with splitter, which right view in some way is MDI client > window; > Is there a way to use CMDIFrameWnd as a pane in a splitter? > > Thanks, Krassimir I think that a CDialogBar will do exactly wat you need - Make a DialogBar in your resource file and include a CTreeControl in it - let the class wizard make the class and fill in the blanks - place the dialogbar into your MainFrame (where the toolbar and the statusbar are included) thats all (more or less) Greetings,
| Вернуться в корень Архива |