Switching view dynamically

Posted on 2000-04-20
Medium Priority
Last Modified: 2013-11-20
I have two view. One derived from CTreeView and the other one derived from CListView. There is a vertical splitter in between these two views.

My problem is that when i right click on one of the tree item on my CTreeView, a popup dialog box appears allowing users to choose an option, (view 1, view 2, view 3)(p/s:List View is in report format).

When a user choose either view 1 or view 2 option, i want it to be able to switch from view 1 to view 2 or from view 2 to view 1(right view)! How do i do that? Please help!

And when i choose view 3 option, i want view 1 and view 2 concurrently displayed on my right view. That also means i want another horizontal splitter windows. How do i do that? Please help.

I would like to say a thousand of thank you for the person that would be able to solve my problem. Thank you!!!
Question by:waho
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

Expert Comment

ID: 2734116
> When a user choose either view 1 or view 2 option, i want it to be able to switch from view 1 to view 2 or from view 2 to view 1(right view)! How do i do that? Please help!

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

there si also other useful code to be found at




Accepted Solution

V_Bapat earned 150 total points
ID: 2734299
Here is the link to the page containing the source for what you want.
You will find here a class derived from CSplitterWnd which
1. shows/hides rows or columns of a static splitter window and
2. switches/replaces views.


Author Comment

ID: 2739335
I have got a solution from ShaunWilde! Anyway thank you for your(V_Bapat) proposed solution!

Expert Comment

ID: 2739593
you still have to assign points :)

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

771 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