Solved

Customize a standard MFC popup panel?

Posted on 2000-03-25
1
273 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 50 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
This video discusses moving either the default database or any database to a new volume.

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now