Solved

help me !

Posted on 1998-09-22
4
169 Views
Last Modified: 2010-04-01
how are you?. I am making a program. I use Visual C++5.0.
I'd like to 1 document class and 2 view class.
I hope to change the view class when I push a toolbar button.all data 2 view classes manage is in DOC. I don't want to use splitter windows. how can I change between two
views and show one view to my user.

0
Comment
Question by:khs
  • 3
4 Comments
 
LVL 3

Accepted Solution

by:
Norbert earned 100 total points
ID: 1173492
I am not sure that you realy need all the functions but asuming that both views are already created and the frame window already knows them this should do the work

GetActiveView()->ShowWindow(SW_HIDE);
SetActiveView(m_SecondView,TRUE);
GetActiveView()->ShowWindow(SW_SHOW);
ActivateFrame();
RecalcLayout(TRUE);
If you don't have created the views (The second view maybe will created only if the user selects your button)
if(m_SecondView==NULL)
{
             CCreateContext Context;
            Context.m_pNewViewClass=RUNTIME_CLASS(CSecondView);
             m_SecondView=(CSecondView*)CreateView(&Context);
}
GetActiveView()->ShowWindow(SW_HIDE);
SetActiveView(m_SecondView,TRUE);
GetActiveView()->ShowWindow(SW_SHOW);
ActivateFrame();
RecalcLayout(TRUE);

0
 
LVL 3

Expert Comment

by:Norbert
ID: 1173493
>>how are you?
BTW: I am fine - The sun is shining and its not to hot or to cold - an nice day in autum
0
 

Author Comment

by:khs
ID: 1173494
I very much thanks for your answer. you are a good programmer.
would you give me a another help?

0
 
LVL 3

Expert Comment

by:Norbert
ID: 1173495
Thanks for the flowers such a good programmer I am not.
Here are Experts where I feel like a 3 years old child.
Ofcourse you can ask more questions, but because I realy don't know everything I would recomend that you ask a new question
At the start perhaps don't offer 100 points. Start with a small number and increase it if neccesary. Then you don't waste your points for such simple questions like this one.

Have a nice Day


0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

786 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