Solved

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

Posted on 2000-04-04
4
178 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

758 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