That message box comes up when the framework calls the virtual method
CDocument::CanCloseFrame() which in turn calls CDocument::SaveModified();
where the messagebox is displayed.
To effectivley suppress the messagebox, override the CanCloseFrame method
and do not call CDocument::CanCloseFrame();
BOOL CMyDocument::CanCloseFrame(CFrameWnd *pFrame)
{
if (Should show the dialog)
{
return CDocument::CanCloseFrame(pFrame);
}
//otherwise just say yes
return TRUE;
}
AliR.
<njoycoding@gmail.com> wrote in message
news:3fc9e99b-807d-41c3-9ee2-a5972bbcb285@i24g2000prf.googlegroups.com...
Hi All,
In have a view obtained from CEditView with readonly property set .
Every time I close the view I get an message saying "Save changes to
CView1" with Yes , No and Cancel buttons
But I dont want this messagebox to popup .....
How do I hide this messagebox ????
Joseph M. Newcomer [MVP]