Solved

help me !

Posted on 1998-09-22
4
170 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

856 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