Click here to Skip to main content
16,006,555 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: had enough of C Pin
Michael Dunn12-May-02 7:22
sitebuilderMichael Dunn12-May-02 7:22 
GeneralRe: had enough of C Pin
Chris Losinger12-May-02 7:40
professionalChris Losinger12-May-02 7:40 
GeneralRe: had enough of C Pin
Max Santos12-May-02 8:15
Max Santos12-May-02 8:15 
GeneralRe: had enough of C Pin
Peter Liddle12-May-02 10:05
Peter Liddle12-May-02 10:05 
GeneralRe: had enough of C Pin
12-May-02 10:59
suss12-May-02 10:59 
GeneralRe: had enough of C Pin
12-May-02 11:04
suss12-May-02 11:04 
GeneralRe: had enough of C Pin
12-May-02 23:55
suss12-May-02 23:55 
Generalclosing documents before closing main window... Pin
marcela12-May-02 5:50
marcela12-May-02 5:50 
hello!

In my MDI app, I added a handler for the OnClose message in CDocument, so I can detect if the document has changed and promt for saving; the prompt has a Cancel button that prevents the document from being closed if the user changes his/her mind Smile | :)

My problem is that when the app is closed and a document has not been saved and you press the cancel button the program (obviously) crashes.

So what I want to do is call the OnClose method of all open documents before closing the main window and if one remains open prevent the app from closing. Can someone help me do this? I don't know how to reach the open documents' list from the main window.


thanks a lot!

marcela bovio


GeneralRe: closing documents before closing main window... Pin
marcela12-May-02 7:03
marcela12-May-02 7:03 
Generalglobal functions Pin
pnpfriend12-May-02 4:55
pnpfriend12-May-02 4:55 
GeneralRe: global functions Pin
Max Santos12-May-02 8:21
Max Santos12-May-02 8:21 
GeneralRe: global functions Pin
pnpfriend12-May-02 8:45
pnpfriend12-May-02 8:45 
GeneralRe: global functions Pin
Max Santos12-May-02 8:41
Max Santos12-May-02 8:41 
GeneralSetPicture question ! Pin
Hadi Rezaee12-May-02 4:34
Hadi Rezaee12-May-02 4:34 
GeneralJPEG loading ! Pin
Hadi Rezaee12-May-02 4:33
Hadi Rezaee12-May-02 4:33 
GeneralRe: JPEG loading ! Pin
Mazdak12-May-02 5:19
Mazdak12-May-02 5:19 
GeneralMicrosoft Forms Image 2.0 question ! Pin
Hadi Rezaee12-May-02 4:31
Hadi Rezaee12-May-02 4:31 
QuestionProxy Source code? Pin
chaolong12-May-02 3:25
chaolong12-May-02 3:25 
AnswerRe: Proxy Source code? Pin
chaolong12-May-02 16:36
chaolong12-May-02 16:36 
GeneralDisable Menu Items Pin
Michi77712-May-02 2:31
Michi77712-May-02 2:31 
GeneralRe: Disable Menu Items Pin
Matt Gullett12-May-02 2:49
Matt Gullett12-May-02 2:49 
QuestionDB2/SQL question ? Pin
Learning12-May-02 2:16
Learning12-May-02 2:16 
AnswerRe: DB2/SQL question ? Pin
Matt Gullett12-May-02 2:37
Matt Gullett12-May-02 2:37 
GeneralRe: DB2/SQL question ? Pin
Learning12-May-02 6:30
Learning12-May-02 6:30 
GeneralVC.NET together with VC ++ 6.0 Pin
Eugene Pustovoyt12-May-02 1:54
Eugene Pustovoyt12-May-02 1:54 

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.