Click here to Skip to main content
15,921,793 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralChanging a view in an SDI. Pin
VanHlebar28-Nov-02 14:32
VanHlebar28-Nov-02 14:32 
GeneralRe: Changing a view in an SDI. Pin
Anatari28-Nov-02 15:15
Anatari28-Nov-02 15:15 
GeneralRe: Changing a view in an SDI. Pin
VanHlebar29-Nov-02 7:40
VanHlebar29-Nov-02 7:40 
GeneralRe: Changing a view in an SDI. Pin
deffer1-Dec-02 17:50
deffer1-Dec-02 17:50 
GeneralRe: Changing a view in an SDI. Pin
valikac28-Nov-02 17:30
valikac28-Nov-02 17:30 
GeneralOpening a new document Pin
Andrew Bleakley28-Nov-02 12:50
Andrew Bleakley28-Nov-02 12:50 
GeneralRe: Opening a new document Pin
valikac28-Nov-02 17:33
valikac28-Nov-02 17:33 
GeneralRe: Opening a new document Pin
Roger Allen29-Nov-02 2:24
Roger Allen29-Nov-02 2:24 
You need a pointer to the document template you want to open a document for. In MFC these templates are stored in a CDocManager class object pointer which is part of your CWinApp object. You could do this:

CDocManager *pDocMan = AfxGetApp()->m_pDocManager;
POSITION pos ;

pos = pDocMan->GetFirstDocPosition();
while (pos)
{
CDocTemplate *pTemplate = pDocMan->GetNextTemplate(pos);
pTemplate->OpenDocumentFile(filename); // or NULL ofr an empty document
}

I may have some of the function names wrong here as its from memory.


Roger Allen
Sonork 100.10016

In case you're worried about what's going to become of the younger generation, it's going to grow up and start worrying about the younger generation. - Roger Allen, but not me!
GeneralRe: Opening a new document Pin
Jamie Hale29-Nov-02 9:04
Jamie Hale29-Nov-02 9:04 
GeneralClassWizard Not Working Properly Pin
Steven M Hunt28-Nov-02 11:29
Steven M Hunt28-Nov-02 11:29 
GeneralRe: ClassWizard Not Working Properly Pin
Anatari28-Nov-02 15:13
Anatari28-Nov-02 15:13 
GeneralFloating CControlbar Question ... Pin
Maximilien28-Nov-02 11:19
Maximilien28-Nov-02 11:19 
GeneralRe: Floating CControlbar Question ... Pin
Maximilien29-Nov-02 3:25
Maximilien29-Nov-02 3:25 
Questionhow to tab to next edit box by pressing 'return (enter key)' Pin
IrishSonic28-Nov-02 11:18
IrishSonic28-Nov-02 11:18 
AnswerRe: how to tab to next edit box by pressing 'return (enter key)' Pin
Chris Losinger28-Nov-02 17:27
professionalChris Losinger28-Nov-02 17:27 
AnswerRe: how to tab to next edit box by pressing 'return (enter key)' Pin
Roger Allen29-Nov-02 4:39
Roger Allen29-Nov-02 4:39 
GeneralLinking Pin
Anthony988728-Nov-02 11:05
Anthony988728-Nov-02 11:05 
Generala non rectangular splash screen class with Alpha blending (Article discussions) Pin
yary28-Nov-02 9:30
yary28-Nov-02 9:30 
GeneralRe: a non rectangular splash screen class with Alpha blending (Article discussions) Pin
Christian Graus28-Nov-02 11:20
protectorChristian Graus28-Nov-02 11:20 
QuestionIs there a function in C++ that will split a char array delimited by a specific character? Pin
Redeemer-dk28-Nov-02 9:05
Redeemer-dk28-Nov-02 9:05 
AnswerRe: Is there a function in C++ that will split a char array delimited by a specific character? Pin
Maximilien28-Nov-02 9:19
Maximilien28-Nov-02 9:19 
GeneralRe: Is there a function in C++ that will split a char array delimited by a specific character? Pin
David Salter29-Nov-02 0:15
David Salter29-Nov-02 0:15 
AnswerRe: Is there a function in C++ that will split a char array delimited by a specific character? Pin
Carlos Antollini28-Nov-02 9:24
Carlos Antollini28-Nov-02 9:24 
AnswerRe: Is there a function in C++ that will split a char array delimited by a specific character? Pin
Joe Woodbury30-Nov-02 6:29
professionalJoe Woodbury30-Nov-02 6:29 
GeneralOperPrinter for network-printer Pin
---iLYA---28-Nov-02 8:55
---iLYA---28-Nov-02 8:55 

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.