Author |
Message |
~Mark F #1 / 10
|
 Adding a new view to MDI
First of all, I have read the MSDN docs, KB, and others at CodeGuru on switching views. The code snippets don't tell you where to add the functions. Are there any tutorials that explain this better? Thanks.
|
Sat, 10 Sep 2005 19:14:20 GMT |
|
 |
Ajay Kalr #2 / 10
|
 Adding a new view to MDI
I am not sure exactly what you want to do. If you want to creat a new view with its own frame, you can use CreateNewFrame on the corresponding doctemplate. -- Ajay Kalra [MVP - VC++]
Quote: > First of all, I have read the MSDN docs, KB, and others at CodeGuru on > switching views. The code snippets don't tell you where to add the > functions. Are there any tutorials that explain this better? > Thanks.
|
Sat, 10 Sep 2005 19:24:52 GMT |
|
 |
~Mark F #3 / 10
|
 Adding a new view to MDI
Quote: > I am not sure exactly what you want to do. If you want to creat a new view > with its own frame, you can use CreateNewFrame on the corresponding > doctemplate. > -- > Ajay Kalra [MVP - VC++]
I want to be able to open a document and view it in three different views (same document in three views). Just as an example, if you have an RTF document and want to display it in WYSIWYG view, plain text view, or RTF code view. So I created an MDI test app from CRichEditView class. I now need to add two new views to it and be able to switch back and forth between the three views. I read an article from codeguru.com on this but I am unclear on exactly how to put it all together.
|
Sat, 10 Sep 2005 19:46:42 GMT |
|
 |
Ajay Kalr #4 / 10
|
 Adding a new view to MDI
If your views are all in the same frame, you can use a splitter to separate the views. Have you looked at example VIEWEX in MSDN. That might be helpful. -- Ajay Kalra [MVP - VC++]
Quote:
> > I am not sure exactly what you want to do. If you want to creat a new view > > with its own frame, you can use CreateNewFrame on the corresponding > > doctemplate. > > -- > > Ajay Kalra [MVP - VC++]
> I want to be able to open a document and view it in three different views > (same document in three views). Just as an example, if you have an RTF > document and want to display it in WYSIWYG view, plain text view, or RTF > code view. > So I created an MDI test app from CRichEditView class. I now need to add two > new views to it and be able to switch back and forth between the three > views. I read an article from codeguru.com on this but I am unclear on > exactly how to put it all together.
|
Sat, 10 Sep 2005 20:12:06 GMT |
|
 |
~Mark F #5 / 10
|
 Adding a new view to MDI
Quote: > If your views are all in the same frame, you can use a splitter to separate > the views. Have you looked at example VIEWEX in MSDN. That might be helpful. > -- > Ajay Kalra [MVP - VC++]
Sorry, should have stated that I will use the child frame and not a splitter window. Simply swap the current view with a new one.
|
Sat, 10 Sep 2005 20:27:08 GMT |
|
 |
CheckAbdou #6 / 10
|
 Adding a new view to MDI
See if the following links helps you http://tinyurl.com/84z5 http://www.microsoft.com/msj/1298/c++/c++1298.htm -- Cheers Check Abdoul [ VC++ MVP ] -----------------------------------
Quote:
> > If your views are all in the same frame, you can use a splitter to > separate > > the views. Have you looked at example VIEWEX in MSDN. That might be > helpful. > > -- > > Ajay Kalra [MVP - VC++]
> Sorry, should have stated that I will use the child frame and not a splitter > window. Simply swap the current view with a new one.
|
Sat, 10 Sep 2005 20:51:46 GMT |
|
 |
Ajay Kalr #7 / 10
|
 Adding a new view to MDI
If you are using a different MDIChildframe for each of the views, then CreateNewFrame will work fine. -- Ajay Kalra [MVP - VC++]
Quote:
> > If your views are all in the same frame, you can use a splitter to > separate > > the views. Have you looked at example VIEWEX in MSDN. That might be > helpful. > > -- > > Ajay Kalra [MVP - VC++]
> Sorry, should have stated that I will use the child frame and not a splitter > window. Simply swap the current view with a new one.
|
Sat, 10 Sep 2005 20:43:52 GMT |
|
 |
~Mark F #8 / 10
|
 Adding a new view to MDI
It would be nice if the samples could be downloaded. 131 MB is impractical and unfair to users that have slow connections. I have a cable connection and it still will take 20 minutes to download the entire file.
|
Sat, 10 Sep 2005 21:20:28 GMT |
|
 |
~Mark F #9 / 10
|
 Adding a new view to MDI
Do I implement it in the CMainFrame class? Do I still need to create a new document template in the CMyApp::InitInstance()? Most examples only _partially_ explain the process.
|
Sat, 10 Sep 2005 21:23:44 GMT |
|
 |
Ajay Kalr #10 / 10
|
 Adding a new view to MDI
You can create these whenever you want it as long as the doctemplate has been created. You typically create the doctemplate in CMyApp::InitInstance. All this should have been done for you by the wizard. You need to do the additional step of creating additional views. -- Ajay Kalra [MVP - VC++]
Quote: > Do I implement it in the CMainFrame class? > Do I still need to create a new document template in the > CMyApp::InitInstance()? > Most examples only _partially_ explain the process.
|
Sat, 10 Sep 2005 21:27:47 GMT |
|
|