?
Solved

help me !

Posted on 1998-09-22
4
Medium Priority
?
175 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.
Suggested Courses

765 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