Click here to Skip to main content
15,910,471 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC Dialog-based Document with multiple forms using VC++6 Pin
Raymond Cowin20-Aug-09 2:36
Raymond Cowin20-Aug-09 2:36 
GeneralRe: MFC Dialog-based Document with multiple forms using VC++6 Pin
Raymond Cowin20-Aug-09 3:14
Raymond Cowin20-Aug-09 3:14 
QuestionConfiguration Dependent String Table? [modified] Pin
Kyudos19-Aug-09 17:09
Kyudos19-Aug-09 17:09 
AnswerRe: Configuration Dependent String Table? Pin
KarstenK19-Aug-09 22:52
mveKarstenK19-Aug-09 22:52 
GeneralRe: Configuration Dependent String Table? Pin
Kyudos20-Aug-09 13:08
Kyudos20-Aug-09 13:08 
GeneralRe: Configuration Dependent String Table? Pin
KarstenK20-Aug-09 20:32
mveKarstenK20-Aug-09 20:32 
AnswerRe: Configuration Dependent String Table? Pin
Kyudos20-Aug-09 16:45
Kyudos20-Aug-09 16:45 
Question<< How Set Desktop Wallpaper with VC++ 2008 ? >> Pin
bzsolt9119-Aug-09 11:50
bzsolt9119-Aug-09 11:50 
AnswerRe: << How Set Desktop Wallpaper with VC++ 2008 ? >> Pin
«_Superman_»19-Aug-09 18:23
professional«_Superman_»19-Aug-09 18:23 
GeneralRe: << How Set Desktop Wallpaper with VC++ 2008 ? >> Pin
Hari-Adarapu20-Aug-09 7:30
Hari-Adarapu20-Aug-09 7:30 
GeneralRe: << How Set Desktop Wallpaper with VC++ 2008 ? >> Pin
bzsolt9120-Aug-09 10:14
bzsolt9120-Aug-09 10:14 
Questiontext pattern matching(wildcard) Pin
moh.hijjawi19-Aug-09 10:52
moh.hijjawi19-Aug-09 10:52 
AnswerRe: text pattern matching(wildcard) Pin
Stuart Dootson19-Aug-09 21:11
professionalStuart Dootson19-Aug-09 21:11 
GeneralRe: text pattern matching(wildcard) Pin
moh.hijjawi20-Aug-09 4:55
moh.hijjawi20-Aug-09 4:55 
QuestionFaq in C : Pin
madhu_v19-Aug-09 6:37
madhu_v19-Aug-09 6:37 
AnswerRe: Faq in C : Pin
Selvam R19-Aug-09 8:19
professionalSelvam R19-Aug-09 8:19 
AnswerRe: Faq in C : Pin
Adam Roderick J19-Aug-09 19:29
Adam Roderick J19-Aug-09 19:29 
GeneralRe: Faq in C : Pin
madhu_v20-Aug-09 0:07
madhu_v20-Aug-09 0:07 
GeneralRe: Faq in C : Pin
CPallini20-Aug-09 0:15
mveCPallini20-Aug-09 0:15 
GeneralRe: Faq in C : Pin
Adam Roderick J23-Aug-09 18:49
Adam Roderick J23-Aug-09 18:49 
AnswerRe: Faq in C : Pin
Rane20-Aug-09 0:50
Rane20-Aug-09 0:50 
GeneralRe: Faq in C : Pin
madhu_v20-Aug-09 5:18
madhu_v20-Aug-09 5:18 
QuestionMFC - Problem with serialization, previous contents of list is shown when selecting 'new' or 'openfile' Pin
simon alec smith19-Aug-09 5:37
simon alec smith19-Aug-09 5:37 
QuestionRe: MFC - Problem with serialization, previous contents of list is shown when selecting 'new' or 'openfile' Pin
bob1697219-Aug-09 6:44
bob1697219-Aug-09 6:44 
AnswerRe: MFC - Problem with serialization, previous contents of list is shown when selecting 'new' or 'openfile' [modified] Pin
krmed19-Aug-09 7:19
krmed19-Aug-09 7:19 
You may be approaching this wrong.

First, since you didn't say, I'm guessing that you have an SDI application. If that's the case, the document is never destroyed until the application exits.

When you choose "new" or "open" the framework calls the CDocument's DeleteContents() function. You need to override that and clean up any previous work or data you may have created - basically, return all values to the point they would be when you first open the application.

Hope that helps.

Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

modified on Thursday, August 20, 2009 6:32 AM

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.