?
Solved

Splitting the Mainframe of an MDI application

Posted on 1998-12-22
5
Medium Priority
?
749 Views
Last Modified: 2013-11-20
My questions involves using a splitter window to organize a MDI app.  What I want to do is create an MDI application whose Mainframe window is split in half.  The left half of the screen contains a table of contents utilizing a tree control. The right half acts as a container for multiple document views, which can be tiled, maximized, cascaded, etcs within the right pane (kind of like how the Visual Studio displays the class view on the left and all the open source files are contained on the right).  I think I need to some how split the mainframe of the MDI app, but am not sure?  What is the best way to attack this?

Thanks!
0
Comment
Question by:WallaceM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Expert Comment

by:plaroche
ID: 1326586
I'd go with a derived control bar where you create your own tree control and place it as a child window.

0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 400 total points
ID: 1326587
The MDI architecture is composed of at least three windows.

  1. MDI frame window
  2. MDI client window
  3. MDI child window

The MDI frame window is the one with the menus and such. It is the umbrella window and the ultimate parent of all the other windows.

The MDI client window is the child of the MDI frame. Its job is to be the middle man between the MDI children and the MDI frame. This is where the MDI children will maximize themselves and arrange into an icon and so forth.

The MDI child window is a child of the MDI client and NOT the MDI window.

So if you want to split the windows, you need to create a splitter in the frame winodw. The left split will have a tree control and the right side is the MDI client window. The tree control will be a sibling to the MDI client window.
0
 

Author Comment

by:WallaceM
ID: 1326588
Could you possible give me some more details i.e. a code example?
Thanks
0
 

Expert Comment

by:DennisP
ID: 1326589
First you need to determine if you want the split window into static or dynamic. Static max number of rows and columns is 16 by 16. Rows and columns maybe resized, but total number of rows and columns are fixed. Dynamic on the other hand has max numbers of rows and columns equal 2 by 2. Rows and columns maybe split and unsplit dynamically.

Dynamic Splitter
1. Use CSplitterWnd::Create function
2. Add CSplitterWnd data member to the frame window class
3. Override the frame window's virtual OnCreateClient function and call CSplitterWnd::Create.

Static Splitter
1. Use CSplitterWnd::Create function
2. Add CSplitterWnd data member to the frame window class
3. Override the frame window's virtual OnCreateClient function and call CSplitterWnd::CreateStatic.
4. Use CSplitterWnd::CreateView to create  view in each of the splitters window's panes.

0
 

Author Comment

by:WallaceM
ID: 1326590
This should be very helpful, Thanks!  However, I understand where the MDI Frame window (MainFrm.cpp\.h by default) is defined, but I can't find where the MDI Client Window is defined.  What is an easy way to get at this object?

Thanks Again
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month9 days, 2 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question