Solved

help me !

Posted on 1998-09-22
4
165 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
Comment Utility
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
Comment Utility
>>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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

728 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

11 Experts available now in Live!

Get 1:1 Help Now