Click here to Skip to main content
15,916,449 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: strcpy and CString question Pin
Rene De La Garza1-Oct-02 10:39
Rene De La Garza1-Oct-02 10:39 
GeneralRe: strcpy and CString question Pin
Michael Dunn1-Oct-02 14:07
sitebuilderMichael Dunn1-Oct-02 14:07 
GeneralRe: strcpy and CString question Pin
Rene De La Garza1-Oct-02 16:27
Rene De La Garza1-Oct-02 16:27 
GeneralRe: strcpy and CString question Pin
Ravi Bhavnani1-Oct-02 5:27
professionalRavi Bhavnani1-Oct-02 5:27 
GeneralRe: strcpy and CString question Pin
Jon Hulatt1-Oct-02 5:34
Jon Hulatt1-Oct-02 5:34 
GeneralRe: strcpy and CString question Pin
Ravi Bhavnani1-Oct-02 6:54
professionalRavi Bhavnani1-Oct-02 6:54 
GeneralRe: strcpy and CString question Pin
Michael Dunn1-Oct-02 7:50
sitebuilderMichael Dunn1-Oct-02 7:50 
GeneralDocument/View startup problem Pin
will13831-Oct-02 4:32
will13831-Oct-02 4:32 
Hi All,

I'm having a problem with the Document/view arch. My problem is this, when a new document is opened, I call my own dll which contains a custom open dialog. This occurs in OnNewDocument. My issue is that if the user cancels out of this dialog without choosing a document, I simply return FALSE out of the OnNewDocument, which causes MFC to destroy the window. When this occurs, the OnCloseDocument is still called and the destructor for my Document class is called, but since the Document object has already been destroyed, i.e. no longer valid, I get a memory access error in the OnCloseDocument and/or the Destructor.WTF | :WTF:

How can I work with this? I've tried several different approaches without much luck
Any suggestions are greatly appreciated. Thanks!

Dan
GeneralRe: Document/View startup problem Pin
Tomasz Sowinski1-Oct-02 5:58
Tomasz Sowinski1-Oct-02 5:58 
GeneralRe: Document/View startup problem Pin
will13831-Oct-02 6:46
will13831-Oct-02 6:46 
GeneralRe: Document/View startup problem Pin
Tomasz Sowinski1-Oct-02 6:55
Tomasz Sowinski1-Oct-02 6:55 
GeneralRe: Document/View startup problem Pin
will13831-Oct-02 7:29
will13831-Oct-02 7:29 
GeneralRe: Document/View startup problem Pin
Tomasz Sowinski1-Oct-02 8:23
Tomasz Sowinski1-Oct-02 8:23 
QuestionWhy does my app close right after starting if i add an IP Address Control? Pin
Anonymous1-Oct-02 4:32
Anonymous1-Oct-02 4:32 
AnswerRe: Why does my app close right after starting if i add an IP Address Control? Pin
Nish Nishant1-Oct-02 5:02
sitebuilderNish Nishant1-Oct-02 5:02 
GeneralString in constructor Pin
Derrick Flannigan1-Oct-02 4:24
Derrick Flannigan1-Oct-02 4:24 
GeneralRe: String in constructor Pin
KarstenK1-Oct-02 4:39
mveKarstenK1-Oct-02 4:39 
GeneralRe: String in constructor Pin
Jon Hulatt1-Oct-02 5:37
Jon Hulatt1-Oct-02 5:37 
QuestionHow to Find the parent application Pin
Ranjan Banerji1-Oct-02 4:11
Ranjan Banerji1-Oct-02 4:11 
GeneralClose button Pin
suresh_sathya1-Oct-02 3:26
suresh_sathya1-Oct-02 3:26 
GeneralRe: Close button Pin
Maximilien1-Oct-02 3:37
Maximilien1-Oct-02 3:37 
GeneralRe: Close button Pin
lucy1-Oct-02 3:58
lucy1-Oct-02 3:58 
GeneralOwner drawn CButton position detection Pin
Merle Pittman1-Oct-02 3:12
Merle Pittman1-Oct-02 3:12 
GeneralRe: Owner drawn CButton position detection Pin
56789012341-Oct-02 3:31
56789012341-Oct-02 3:31 
GeneralRe: Owner drawn CButton position detection Pin
jhwurmbach1-Oct-02 3:40
jhwurmbach1-Oct-02 3:40 

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.