procedure TfrmDeskMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin
CanClose := True; if Desktop.Desktops.Count > 1 then // user has probably created an additional desktop or two CanClose := MessageDlg('请确认所有桌面的内容都已保存,真的要退出吗?', mtWarning, [mbYes, mbNo], 0) = mrYes; if CanClose then if Desktop.GetCurrentDeskTopName = 'Default' then begin if CommonData<>nil then UnMapCommonData(CommonData, HMapFile); end;