Click here to Skip to main content
15,886,781 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating an sdi app with static split view.I am not using the wizard to generate my codes.I am writing the document view program from the scratch.What I which to know is do I create a document template as showb below?

CSingleDocTemplate *DocPtr
= new CSingleDocTemplate(IDR_FRAMEWIN,
RUNTIME_CLASS(CSampleDoc),
RUNTIMECLASS(CMainWin),
RUNTIMECLASS(CSamplView));

If yes, since my app has more than one view which view would I use in this call.

Thanks.
Posted
Updated 10-Feb-14 21:08pm
v2
Comments
Gbenbam 11-Feb-14 2:43am    
I mean do I need to call it in my app's initinstance function?
Gbenbam 11-Feb-14 3:43am    
Please ignore the last comment.It is misleading.
Gbenbam 11-Feb-14 3:52am    
Here is my question rephrased.
For someone writing an MFC document/view architecture program ,that uses a split window, from the scratch.If the split window of his app uses different views like edit view , List view, Form view etc. Which of these views must he use to create a CSingleDocTemplate object if he must still so do.

1 solution

 
Share this answer
 
Comments
Gbenbam 11-Feb-14 3:41am    
I have read through that and many more related ones already. My app uses a split window and three different views I which to know which of the views I must use in that in creating a document template if need be.Believe me I have done substantial reading on this already.Okay, Let's say one view is a form view, another a listview and a third a edit view.Which of them musg I use to create a document template if I must?
Richard MacCutchan 11-Feb-14 5:43am    
You only create a single document template and then, if required, you can add other views as described in http://msdn.microsoft.com/en-us/library/s199bks0.aspx.
Gbenbam 11-Feb-14 5:52am    
I have already read this article.It talks about switching views.My apllication does not switch views.It retains all views.I have already read this article and similar related ones.
Gbenbam 11-Feb-14 6:01am    
Thanks a lot.Although I had read the articleI did not pay close attention to the refernce to add views function above.This article actually answers my question.Once again thanks and a billion thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900