Solved

How to avoid from getting a save message when closing a document?

Posted on 2002-05-27
3
212 Views
Last Modified: 2013-11-20
Hi,

I'm doing an MDI application in which my windows, which are a CRichEditView windows, view files.
When I close each window I get this messagebox which asks me if I want to save the file.
I do not want this message to pop up, and I found that it appears in the CFrameWnd::OnClose function.
What can I do to bypass this message?
0
Comment
Question by:shmuelal
3 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 7036894
I'm sure there are 100 ways but one would be to override the CFrameWnd:OnClose function and avoid displaying the confirmation dialog.
0
 
LVL 31

Accepted Solution

by:
Zoppo earned 100 total points
ID: 7036895
Hi shmuelal,

override for your CDocument-derived class the function:
virtual BOOL SaveModified( );

and in there return TRUE if the document should be closed.

hope that helps,

ZOPPO
0
 

Author Comment

by:shmuelal
ID: 7036903
Thanks - It works!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how do i create updater to My Activex application? 3 97
List out all word 7 320
has77  challenge 9 92
wordcount challenge 11 134
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question