Solved

Changing the Location Of A Static Splitter Views (is it possible??)

Posted on 2000-04-04
4
181 Views
Last Modified: 2013-11-20
My users want the ability to rotate or swap the views in a MDI splitter window. Views at the top have special responsibilities and this gives them the ability to drive the application.  So if the author view is at the top then it drives the selection of titles from the database and the same for the titles view.

Not being very experience with splitters, is it possible to relocate/swap views, within the window? without having to recreate everything. That is: 2 views are on the screen topview and bottomview I need to move the topview to the
bottom and the bottomview to the top.

0
Comment
Question by:andrestewart
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
migel earned 100 total points
ID: 2686483
Hi!
of course you can change splitter panes:
for example:
OnSwapPanes()
{
// assume that you have horz splitter with 2 panes
//
CWnd* pViewPane1 = m_wndHorzSplitter.GetPane(0,0);
CWnd* pViewPane2 = m_wndHorzSplitter.GetPane(1,0);
::SetWindowLong(pViewPane1->GetSafeHwnd(), GWL_ID, m_wndHorzSplitter.IdFromRowCol( 1, 0 );
::SetWindowLong(pViewPane2->GetSafeHwnd(), GWL_ID, m_wndHorzSplitter.IdFromRowCol( 0, 0 );
m_wndHorzSplitter.RecalcLayout();
}
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2686604
have a look at

http://www.codetools.com/splitter/usefulsplitter.asp

It has a ReplaceView function - which allows you to change any pane for a splitter - note this usually requires you to adhere strictly to the doc-view model where the data is stored in the doc and view is purely presentational.
0
 

Author Comment

by:andrestewart
ID: 2686940
Edited text of question.
0
 

Author Comment

by:andrestewart
ID: 2687022
works like a charm. All I had to do is tell my doc that
the views as been swaped, my doc set set some flags and the top view became top dog.


Thank you
Andre
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Detect CR LF to each line 12 152
Prevent this page from creating additional dialogs. 3 390
substring method in java 1 97
dog bark java program 15 87
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now