Solved

Switching view dynamically

Posted on 2000-04-20
4
156 Views
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!!!
0
Comment
Question by:waho
  • 2
4 Comments
 
LVL 9

Expert Comment

by:ShaunWilde
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

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

and

http://www.codeguru.com/splitter/index.shtml
0
 
LVL 3

Accepted Solution

by:
V_Bapat earned 50 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.

http://codeguru.developer.com/mfc/comments/7113.shtml
0
 

Author Comment

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

Expert Comment

by:ShaunWilde
ID: 2739593
you still have to assign points :)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 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

17 Experts available now in Live!

Get 1:1 Help Now