CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Location
    Pell City, Alabama
    Posts
    126

    MDI Suppress Prompt To Save When Closing View

    In my MDI application when I close one of the Child MDI windows, I am prompted if I want to save or not. In this situation I have no desire to save the contents, I just want it to close without prompting.

    I overrode CDocument:: DoSave in the document derived class to do nothing, so it doesn't try to save it anymore but I am still bothered by the prompt to save the document. How can I remove the prompt ?

    What I am after is no prompt to save, just the MDI child politely closing.


    EDIT: Nevermind, I figured it out, it was SaveModified() that needed to be overridden.

    Thanks Anyway!
    Last edited by Mutilated1; August 4th, 2005 at 04:22 PM.

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: MDI Suppress Prompt To Save When Closing View

    Are you setting the document's modified flag ? What kind of view are you using ?

  3. #3
    Join Date
    May 2004
    Location
    Pell City, Alabama
    Posts
    126

    Re: MDI Suppress Prompt To Save When Closing View

    I was specifically trying not to set the Document's modified flag, but it appears that some part of my framework was setting it anyway. The View inherits both CMyView and a worker class I need to use.

    Well its fixed now anyway, thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured