Saving Documents Without Confimation Dialog
-
Hi, I have an MDI project. When some changes occur in a view i call the view's document's SetModifiedFlag() method and when the user attempts to close the child frame, it asks to save the recent changes and that's OK. I also have a Save Project button on the toolbar and when it is pressed it calls CDocTemplate::SaveAllModified() method and saves the modified documents but the problem is it still pops a confirmation dialog. It looks rather silly when the user presses "Save" and it says "Do you want to save?".. Is there a way that i can "silently" save the documents without displaying the confirmation dialog box? Any idea is welcome. Thanks in advance.
-
Hi, I have an MDI project. When some changes occur in a view i call the view's document's SetModifiedFlag() method and when the user attempts to close the child frame, it asks to save the recent changes and that's OK. I also have a Save Project button on the toolbar and when it is pressed it calls CDocTemplate::SaveAllModified() method and saves the modified documents but the problem is it still pops a confirmation dialog. It looks rather silly when the user presses "Save" and it says "Do you want to save?".. Is there a way that i can "silently" save the documents without displaying the confirmation dialog box? Any idea is welcome. Thanks in advance.
Hi, I Think this is possible. Just try to overwrite the CFileDialog() or Do the serialization by skipping CFileDialog(). This is a huge mess I think. I am tryieng this application by myself. If I get the solution I will surely let u know. bbye Salman Live and Let live
-
Hi, I have an MDI project. When some changes occur in a view i call the view's document's SetModifiedFlag() method and when the user attempts to close the child frame, it asks to save the recent changes and that's OK. I also have a Save Project button on the toolbar and when it is pressed it calls CDocTemplate::SaveAllModified() method and saves the modified documents but the problem is it still pops a confirmation dialog. It looks rather silly when the user presses "Save" and it says "Do you want to save?".. Is there a way that i can "silently" save the documents without displaying the confirmation dialog box? Any idea is welcome. Thanks in advance.
(Grab active window, click the button with name "&save") U will find such program on net which will do this for u. e.g. dismiss.exe which will do the same explained on 1st line. The chosen One :)
-
Hi, I have an MDI project. When some changes occur in a view i call the view's document's SetModifiedFlag() method and when the user attempts to close the child frame, it asks to save the recent changes and that's OK. I also have a Save Project button on the toolbar and when it is pressed it calls CDocTemplate::SaveAllModified() method and saves the modified documents but the problem is it still pops a confirmation dialog. It looks rather silly when the user presses "Save" and it says "Do you want to save?".. Is there a way that i can "silently" save the documents without displaying the confirmation dialog box? Any idea is welcome. Thanks in advance.
volkan878 wrote: Is there a way that i can "silently" save the documents without displaying the confirmation dialog box? You'll need to override the
CDocument::SaveModified()
method to do everything the base class does sans the prompt.
A rich person is not the one who has the most, but the one that needs the least.
-
volkan878 wrote: Is there a way that i can "silently" save the documents without displaying the confirmation dialog box? You'll need to override the
CDocument::SaveModified()
method to do everything the base class does sans the prompt.
A rich person is not the one who has the most, but the one that needs the least.
Thank you all for your responses. I think the most efficient way for to overcome the problem, as DavidCrow suggested, will be overriding CDocument::SaveModified(). After David's post i wondered what MSDN says about SaveModified() and it says : "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" So, altough i wished to discover a method like TurnOffTheStupidDialog(), i think i'll go for overriding it. Anyway, thank you again for your replies.