?
Solved

Customize a standard MFC popup panel?

Posted on 2000-03-25
1
Medium Priority
?
295 Views
Last Modified: 2013-11-20
When the Document has been changed and the user wants to exit the application, a popup comes up, saying something like: "Save Changes to XXX?" with Yes/No footers.

My problem is that the Document filename ("XXX" in example above) is an "internal" name which I want to hide from the user -- rather, I want to put my own informative string in there.  Its like I maintain a "user name" for my document files.  Hence, I want the pop-p to say "Save Changes to My_Cool_Name?"

How can I customize MFC's behaviour to get this?  A code example and/or explicit directions would be great...

Thanks!
0
Comment
Question by:tullhead
1 Comment
 

Accepted Solution

by:
ChristianParent earned 150 total points
ID: 2658462
CDocument::SaveModified
virtual BOOL SaveModified( );

Return Value

Nonzero if it is safe to continue and close the document; 0 if the document should not be closed.

Remarks

Called by the framework before a modified document is to be closed. The default implementation of this function displays a message box asking the user whether to save the changes to the document, if any have been made. Override this function if your program requires a different prompting procedure. This is an advanced overridable.

CDocument Overview |  Class Members |  Hierarchy Chart

See Also   CDocument::CanCloseFrame, CDocument::IsModified, CDocument::OnNewDocument, CDocument::OnOpenDocument, CDocument::OnSaveDocument
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Loops Section Overview
Suggested Courses

864 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