Click to See Complete Forum and Search --> : Multi doc in a pane of splitter


Laurent Bernard
June 1st, 1999, 02:29 AM
I try to put some MDIChildwnd in a pane of splitter like the editor pane on Visual C++.

The Visual C++ Manual said :
"A dynamic splitter window typically is used to create and scroll a number of individual panes, or views, of the same document. "

Why "typically" ? Does it mean it possible to use multi document or not ?

thank you


---------------------------------------------
Laurent BERNARD
Ingénieur Développement - Logiciel Visilog

NOESIS
6, rue de la réunion
91940 Les Ulis

E-mail : lb@noesis.fr

Tél.: 01 64 86 78 50 poste 290
------------------------------------------------

Tarun Patel
June 1st, 1999, 04:53 AM
It is possible through static splitter.

Laurent Bernard
June 1st, 1999, 05:32 AM
Could you explain me how ? (Please !)
do you have a sample ?

---------------------------------------------
Laurent BERNARD
Ingénieur Développement - Logiciel Visilog

NOESIS
6, rue de la réunion
91940 Les Ulis

E-mail : lb@noesis.fr

Tél.: 01 64 86 78 50 poste 290
------------------------------------------------

Jason Teagle
June 2nd, 1999, 06:28 AM
I tried using a splitter, then creating an MDI parent frame as the right-hand pane, and then just overriding the child frame behaviour very slightly to get it to recognize the MDI 'pane' as a normal MDI frame - but it didn't quite work correctly. First, although I could move the child frame quite happily, it never showed that it was the active window (title bar stayed grey). Secondly, as long as I only ever had one child frame open everything was OK. If I tried to open a second frame while the first was still showing, it caused an 'unhandled exception' in USER.EXE. It seemd to go wrong when it tried to update the child and parent frame's title bar caption when the second frame was activated. I have not figured out why, yet.

Any ideas?

Jason Teagle
June 2nd, 1999, 06:36 AM
Splitter windows and MDI are completely separate. The splitter window is one window which can have a number of bars (which you create and drag into place) which allow that same window to be split into smaller viewports - each viewport can display a separate area of the SAME document.

An MDI, as you know, displays SEPARATE windows (frames) which may or may not show the same document.

I am 99% certain that the VC++ environment is NOT a splitter window. It is a normal MDI window which has dockable control bars - it's just that those control bars look more like full windows or panes of a splitter. These pane-like control bars act just like your standard toolbar and status bar - the MFC framework allows them to specify their size and then creates the MDI space for child frames in the area that they leave behind. Double-click a blank area of the Class View and output window to undock them, and it might become clearer.

If you want an app that looks like the VC++ environment, I recommend that approach (dockable pane thingies).

P.S. Yes, I know the Class View and output window are sizable, but control bars normally aren't - I guess MS have enhanced their control bars to be sizable.

Laurent Bernard
June 2nd, 1999, 09:19 AM
Thank you Jason


I have a new way for this problem !

When you use the methode CreateView to put a RUNTIME_CLASS(CView) in a pane, you can else put a RUNTIME_CLASS(CMDIFrameWnd). Then, you can use this pane like a container for the CMDIChildWnd. But, there are many problems to associate the good ClientArea and the good menu with the good CMDIFrameWnd.

What do you think about this ?

---------------------------------------------
Laurent BERNARD
Ingénieur Développement - Logiciel Visilog

NOESIS
6, rue de la réunion
91940 Les Ulis

E-mail : lb@noesis.fr

Tél.: 01 64 86 78 50 poste 290
------------------------------------------------

Jason Teagle
June 2nd, 1999, 09:26 AM
Salut Laurent,
please read my response to Tarun Patel's response to your original post on this subject. I tried exactly what you are suggesting, and although it appears to work at first (I even got it to create the child frames in the right place), other things went horribly wrong. Shame, it seemed a good idea. I really think the standard-MDI-with-pane-like-dockable-control-bars method is the easier of the two, as it does not make any attempt to re-route the MFC framework as this method does.

"The more they try to overtake the plumbing..." - Scotty in Star Trek III.

Laurent Bernard
June 3rd, 1999, 03:41 AM
thank's a lot Jason

You're totally all right. Visual doesn't use splitters but toolbar. And any application uses the multidoctemplate in a pane !!!

Well, let's go for a toolbar strategy

An over question: do you know how can i take the login name of the current user in a Visual C++ application on NT 4 ?


---------------------------------------------
Laurent BERNARD
Ingénieur Développement - Logiciel Visilog

NOESIS
6, rue de la réunion
91940 Les Ulis

E-mail : lb@noesis.fr

Tél.: 01 64 86 78 50 poste 290
------------------------------------------------

Jason Teagle
June 3rd, 1999, 04:38 AM
Use the GetUserName() API call.