Click here to Skip to main content
15,921,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using Scintilla Editor in MFC TDI application, wherein, the issue is when user modifies, the document by adding text and does undo the change, using context/main menu, the document prompts for SAVE,
I changed has follows but, when I modify file, say 1.c and close , I get prompt, but other files along with 1.c even though non- modified, displays prompt.

My query, is the how we can resolve the issue, wherein the prompt displays for the document modified only.
Here default code has been provided by scintillamfc application(Code Project) given by bold

we implemented below code for SavePointReached

C++
CMyView::OnNotify()
{
case SCN_SAVEPOINTREACHED:
   {
    CDocument*pDoc = GetDocument();
    pDoc->SetModifiedFlag(FALSE);
    .....
    
         break;
}

Whereas 
SCN_SAVEPOINTLEFT:
CDocument *pDoc = GetDocument();

//pDoc->SetModifiedFlag(FALSE);

pDoc->SetModifiedFlag(TRUE);

break;
}


what is the rationale of using just

C++
SCN_SAVEPOINTREACHED:
break;

instead.,

Please clarify.

Thanks in Advance,
Posted
Updated 24-Aug-11 9:31am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900