![]() |
CanCloseFrame() never calls SaveModified() |
Post Reply ![]() |
Author | |
alan.f.rice ![]() Newbie ![]() Joined: 28 July 2010 Location: United States Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |