| 661 | } |
| 662 | |
| 663 | bool CloseMemoryWatch() |
| 664 | { |
| 665 | int result = 0; //Flag for asking to save changes |
| 666 | |
| 667 | if(hwndMemWatch) |
| 668 | { |
| 669 | SaveStrings(); |
| 670 | |
| 671 | if (fileChanged) |
| 672 | { |
| 673 | result = MessageBox(hwndMemWatch, "Save Changes?", "Memory Watch Settings", MB_YESNOCANCEL); |
| 674 | if (result == IDYES) |
| 675 | { |
| 676 | QuickSaveMemWatch(); |
| 677 | DestroyWindow(hwndMemWatch); |
| 678 | hwndMemWatch=0; |
| 679 | return true; //true = User did not choose to cancel operation |
| 680 | } |
| 681 | else if (result == IDNO) |
| 682 | { |
| 683 | DestroyWindow(hwndMemWatch); |
| 684 | hwndMemWatch=0; |
| 685 | return true; //Don't run SaveMemWatch, but return true |
| 686 | } |
| 687 | else |
| 688 | return false; //User requested cancel, so abort the attempt to close |
| 689 | } |
| 690 | else //File was not changed so just close |
| 691 | { |
| 692 | DestroyWindow(hwndMemWatch); |
| 693 | hwndMemWatch=0; |
| 694 | } |
| 695 | } |
| 696 | return true; |
| 697 | } |
| 698 | |
| 699 | //New File |
| 700 | void ClearAllText() |
no test coverage detected