Click here to Skip to main content
15,886,664 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCustom build Pin
0v3rloader27-Oct-04 3:31
0v3rloader27-Oct-04 3:31 
GeneralRe: Custom build Pin
RChin27-Oct-04 4:30
RChin27-Oct-04 4:30 
GeneralRe: Custom build Pin
Blake Miller27-Oct-04 4:54
Blake Miller27-Oct-04 4:54 
GeneralRe: Custom build Pin
0v3rloader27-Oct-04 6:29
0v3rloader27-Oct-04 6:29 
GeneralRe: Custom build Pin
Blake Miller27-Oct-04 9:39
Blake Miller27-Oct-04 9:39 
GeneralMerging different files into one big file Pin
gunnar6627-Oct-04 3:31
gunnar6627-Oct-04 3:31 
GeneralRe: Merging different files into one big file Pin
Blake Miller27-Oct-04 4:57
Blake Miller27-Oct-04 4:57 
QuestionSeveral views for one document in MDI? Pin
T.T.H.27-Oct-04 3:20
T.T.H.27-Oct-04 3:20 
On days like this I feel like a total n00b, even after three years of intensivly using MFC... do a good deed today and help me... pleeeease!

I do have Visual Studio .NET 2003 and plan to make a multi document application with several different views for each document so I can switch on-the-fly between those different views with some buttons on the toolbar.

For achieving this I used the project wizard to generate a multi document Doc/View application with the view derived from CView. So far so good. Now I inserted a new MFC class derived from CFormView and I enabled the checkbox "Create DocTemplate ressources". Afterwards I had a new class, a new dialog in the ressources and in the applications InitInstance() I got this:

CMultiDocTemplate* pNewDocTemplate = new CMultiDocTemplate(
  IDR_SOMEFORMVIEW_TMPL,
  RUNTIME_CLASS(CTestMultiViewsDoc),
  RUNTIME_CLASS(CChildFrame),
  RUNTIME_CLASS(CSomeFormView));
AddDocTemplate(pNewDocTemplate);


When I start my application now I get the following window:

(image link)

Question 1: how do I circumvent this dialog and preselect one of those views?

Question 2: how do I switch between those views during runtime without closing/deleting the document?

Jup, that would be it.


I have already read this Codeproject article and this (quite old) Codeguru article but I do not get it working as I want it to work.

There must be a good and simple solution for this, because my intend isn't that special I think. So please tell me how to do it or where to read more about it.

Thanks & Bye,
Matthias / T.T.H.
AnswerRe: Several views for one document in MDI? Pin
l a u r e n27-Oct-04 15:19
l a u r e n27-Oct-04 15:19 
GeneralRe: Several views for one document in MDI? Pin
T.T.H.28-Oct-04 23:33
T.T.H.28-Oct-04 23:33 
AnswerRe: How to get the path of a file in VC++ Pin
Maximilien27-Oct-04 2:42
Maximilien27-Oct-04 2:42 
GeneralDirectShow Pin
mcsherry27-Oct-04 1:56
mcsherry27-Oct-04 1:56 
GeneralRe: DirectShow Pin
mcsherry28-Oct-04 2:29
mcsherry28-Oct-04 2:29 
QuestionHow to Change Audio device Volume ? Pin
P_JAYAPRAKASH27-Oct-04 1:39
P_JAYAPRAKASH27-Oct-04 1:39 
AnswerRe: How to Change Audio device Volume ? Pin
David Crow27-Oct-04 2:47
David Crow27-Oct-04 2:47 
GeneralRe: How to Change Audio device Volume ? Pin
P_JAYAPRAKASH27-Oct-04 16:47
P_JAYAPRAKASH27-Oct-04 16:47 
GeneralRe: How to Change Audio device Volume ? Pin
David Crow28-Oct-04 5:01
David Crow28-Oct-04 5:01 
GeneralRe: How to Change Audio device Volume ? Pin
P_JAYAPRAKASH28-Oct-04 17:23
P_JAYAPRAKASH28-Oct-04 17:23 
GeneralRe: How to Change Audio device Volume ? Pin
David Crow29-Oct-04 4:24
David Crow29-Oct-04 4:24 
GeneralCliping sound file Pin
RamiQadi27-Oct-04 1:37
RamiQadi27-Oct-04 1:37 
GeneralC++ WMI Pin
torben0027-Oct-04 1:23
torben0027-Oct-04 1:23 
QuestionHow to get the path of a file in VC++ Pin
ledallam27-Oct-04 1:12
ledallam27-Oct-04 1:12 
AnswerRe: How to get the path of a file in VC++ Pin
sarath_babu27-Oct-04 1:40
sarath_babu27-Oct-04 1:40 
GeneralTwo successive dialogs in a dlg app Pin
CaesarCZ27-Oct-04 1:01
CaesarCZ27-Oct-04 1:01 
GeneralRe: Two successive dialogs in a dlg app Pin
wb27-Oct-04 1:24
wb27-Oct-04 1:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.