Click here to Skip to main content
15,917,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: missing DLL_PROCESS_DETACH Pin
Kurotora24-Aug-01 21:00
Kurotora24-Aug-01 21:00 
GeneralGetting the current URL from IE Pin
LukeV24-Aug-01 7:52
LukeV24-Aug-01 7:52 
GeneralRepositioning controls on re-size. Pin
John Uhlenbrock24-Aug-01 7:28
John Uhlenbrock24-Aug-01 7:28 
GeneralWizard Dialogs and SetFocus Pin
24-Aug-01 7:00
suss24-Aug-01 7:00 
GeneralRe: Wizard Dialogs and SetFocus Pin
Masaaki Onishi24-Aug-01 7:58
Masaaki Onishi24-Aug-01 7:58 
GeneralClosing initial Document in MDI Pin
24-Aug-01 6:16
suss24-Aug-01 6:16 
GeneralRe: Closing initial Document in MDI Pin
Tim Deveaux24-Aug-01 6:39
Tim Deveaux24-Aug-01 6:39 
GeneralRe: Closing initial Document in MDI Pin
Dave Glick24-Aug-01 8:47
Dave Glick24-Aug-01 8:47 
To answer your second question the way I've always done it is as follows:

1) Find the document template (each template is a different doc/view class - you probably only have one in which case just ignore the last two lines)...

POSITION DocPosition;
DocPosition = GetFirstDocTemplatePosition();
CDocTemplate* first_template = GetNextDocTemplate(DocPosition);
CDocTemplate* second_template = GetNextDocTemplate(DocPosition);
CDocTemplate* third_template = GetNextDocTemplate(DocPosition);

2) Create a new file

CSomethingDoc* newdoc = STATIC_DOWNCAST(CSomethingDoc, first_template->CreateNewDocument());

3) Do any work in the Document class you need to and then show the new file

CFrameWnd* newframe = first_template->CreateNewFrame(newdoc, NULL);
newframe->InitialUpdateFrame(newdoc, TRUE);

Hope that helps.

-Dave
GeneralRe: Closing initial Document in MDI Pin
Jerry Wang27-Sep-01 9:56
Jerry Wang27-Sep-01 9:56 
GeneralRe: Closing initial Document in MDI Pin
J Patel27-Sep-01 10:12
J Patel27-Sep-01 10:12 
GeneralRe: Closing initial Document in MDI Pin
Jerry Wang27-Sep-01 10:30
Jerry Wang27-Sep-01 10:30 
GeneralRe: Closing initial Document in MDI Pin
Dave Glick28-Sep-01 2:31
Dave Glick28-Sep-01 2:31 
GeneralRe: Changing Documents in SDI app Pin
Ben Burnett24-Aug-01 15:55
Ben Burnett24-Aug-01 15:55 
GeneralFind controls on Window Pin
24-Aug-01 5:02
suss24-Aug-01 5:02 
GeneralRe: Find controls on Window Pin
Matt Gullett24-Aug-01 5:06
Matt Gullett24-Aug-01 5:06 
GeneralRe: Find controls on Window Pin
24-Aug-01 5:52
suss24-Aug-01 5:52 
GeneralRe: Find controls on Window Pin
Matt Gullett24-Aug-01 6:05
Matt Gullett24-Aug-01 6:05 
GeneralRe: Find controls on Window Pin
24-Aug-01 6:07
suss24-Aug-01 6:07 
GeneralRe: Find controls on Window Pin
24-Aug-01 6:17
suss24-Aug-01 6:17 
GeneralDeleting a dynamically allocated 2d array Pin
Josh Knox24-Aug-01 4:11
Josh Knox24-Aug-01 4:11 
GeneralRe: Deleting a dynamically allocated 2d array Pin
Tim Deveaux24-Aug-01 6:00
Tim Deveaux24-Aug-01 6:00 
GeneralRe: Deleting a dynamically allocated 2d array (part II) Pin
Tim Deveaux24-Aug-01 8:39
Tim Deveaux24-Aug-01 8:39 
GeneralBorland C++ Builder : DLL Load Error Pin
AaroC35724-Aug-01 4:04
AaroC35724-Aug-01 4:04 
QuestionHow to remove the maximize button... Pin
Maer72724-Aug-01 3:28
Maer72724-Aug-01 3:28 
AnswerRe: How to remove the maximize button... Pin
Zoltan Csizmadia24-Aug-01 4:14
Zoltan Csizmadia24-Aug-01 4:14 

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.