anchor.diff:      exit(true);
   
     if AWithCancel then
  -    Flags:= MB_YESNOCANCEL or MB_ICONQUESTION
  +    MsgFlags:= MB_YESNOCANCEL or MB_ICONQUESTION
     else
  -    Flags:= MB_YESNO or MB_ICONQUESTION;
  +    MsgFlags:= MB_YESNO or MB_ICONQUESTION;
   
     ListNoSave:= TFPList.Create;
     try
  
positive.code:       if bModified then
          case MsgBox(
                 Format(msgConfirmSaveModifiedTab, [F.TabCaption]),
                 Flags) of
            ID_YES:
              begin
                //Cancel in "Save as" dlg must be global cancel
  
negative.code:     FreeAndNil(ListNoSave);
    end;
  
    DoCloseAllTabs;
    Result:= true;
  end;
  