Solved

Switching view dynamically

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 163
sum67 challenge 35 93
ShiftLeft challenge 21 76
How to convert MFC::CString to UTF8 wchar_t* 10 148
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: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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…

895 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