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.