Solved

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

Posted on 2000-04-04
4
191 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
[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
  • 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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

636 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