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
Solved

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

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to know only "File created" with EventLog 3 35
Best tools for Backup and restore of Wordpress site 6 57
fizzArray  challenge 1 94
tripleUp challenge 7 86
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

808 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