Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

help me !

Posted on 1998-09-22
4
Medium Priority
?
176 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
[X]
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
  • 3
4 Comments
 
LVL 3

Accepted Solution

by:
Norbert earned 300 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

636 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