Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CanCloseFrame() never calls SaveModified()
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CanCloseFrame() never calls SaveModified()

 Post Reply Post Reply
Author
Message
alan.f.rice View Drop Down
Newbie
Newbie


Joined: 28 July 2010
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote alan.f.rice Quote  Post ReplyReply Direct Link To This Post Topic: CanCloseFrame() never calls SaveModified()
    Posted: 05 April 2012 at 4:01pm
In 2010 my partner and I embarked on a major upgrade to our VC++ code suite, that included upgrading from VS6 to VS2010 and from CJ 6.0 to ToolkitPro 13.42.

We are having a problem where, when the user exits the main application, CFrameWnd::OnClose() will call CanCloseFrame(pFrame) in doccore.cpp, which loops through each open CView *pView.  While inside the pView loop gets the parent frame,

     CFrameWnd* pFrame = pView->GetParentFrame()

and checks to see if there are any document windows still active within the frame: 

if (pFrame->m_nWindow > 0)
      return TRUE;     // more than one frame referring to us

There are several views with frames that have 1 or 2 documents, so the return is executed and the program exits fully without ever reaching the last line in CanCloseWindow() which is SaveModified().

Now, I'm not certain this problem manifested with the move from CJ60 to ToolKitPro, but we have had several other shutdown issues we have had to rework our code for and so there is an element of suspicion.

Anyone have any insight into this?

Thanks,

Al
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.