Rev 124 | Rev 171 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 124 | Rev 140 | ||
|---|---|---|---|
| Line 14... | Line 14... | ||
| 14 | 14 | ||
| 15 | void DialogBox_Quit (void) |
15 | void DialogBox_Quit (void) |
| 16 | { |
16 | { |
| 17 | // helper function to fire up the modeless dialog box |
17 | // helper function to fire up the modeless dialog box |
| 18 | 18 | ||
| - | 19 | is_dialogbox_displayed = true; |
|
| 19 | _beginthread (StartThread_ThisDialog, 0, NULL); // fire up a new thread to display the dialog box |
20 | _beginthread (StartThread_ThisDialog, 0, NULL); // fire up a new thread to display the dialog box |
| 20 | 21 | ||
| 21 | return; // return as soon as the thread is fired up |
22 | return; // return as soon as the thread is fired up |
| 22 | } |
23 | } |
| 23 | 24 | ||
| Line 47... | Line 48... | ||
| 47 | retval = DialogBox (hAppInstance, MAKEINTRESOURCE (THIS_DIALOG), hMainWnd, DialogProc_ThisDialog); |
48 | retval = DialogBox (hAppInstance, MAKEINTRESOURCE (THIS_DIALOG), hMainWnd, DialogProc_ThisDialog); |
| 48 | if (retval == 1) |
49 | if (retval == 1) |
| 49 | is_dialogbox_quit_validated = true; // if we simply want to quit, flag the quit dialog box as confirmed |
50 | is_dialogbox_quit_validated = true; // if we simply want to quit, flag the quit dialog box as confirmed |
| 50 | else if (retval == 2) |
51 | else if (retval == 2) |
| 51 | DialogBox_Save (true); // else if we want to save THEN quit, fire up the save dialog box first (and tell it to raise the quit confirmation flag after it returns) |
52 | DialogBox_Save (true); // else if we want to save THEN quit, fire up the save dialog box first (and tell it to raise the quit confirmation flag after it returns) |
| - | 53 | is_dialogbox_displayed = false; |
|
| 52 | 54 | ||
| 53 | the_board.reevaluate = true; // refresh the GUI buttons if needed |
55 | the_board.reevaluate = true; // refresh the GUI buttons if needed |
| 54 | return; // _endthread() implied |
56 | return; // _endthread() implied |
| 55 | } |
57 | } |
| 56 | 58 | ||