Rev 124 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 124 | Rev 140 | ||
|---|---|---|---|
| Line 23... | Line 23... | ||
| 23 | 23 | ||
| 24 | void DialogBox_Challenge (int challenge_index) |
24 | void DialogBox_Challenge (int challenge_index) |
| 25 | { |
25 | { |
| 26 | // helper function to fire up the modeless dialog box |
26 | // helper function to fire up the modeless dialog box |
| 27 | 27 | ||
| - | 28 | is_dialogbox_displayed = true; |
|
| 28 | _beginthread (StartThread_ThisDialog, 0, (void *) challenge_index); // fire up the thread |
29 | _beginthread (StartThread_ThisDialog, 0, (void *) challenge_index); // fire up the thread |
| 29 | return; // return as soon as the thread is fired up |
30 | return; // return as soon as the thread is fired up |
| 30 | } |
31 | } |
| 31 | 32 | ||
| 32 | 33 | ||
| Line 73... | Line 74... | ||
| 73 | int challenge_index; |
74 | int challenge_index; |
| 74 | int interlocutor_index; |
75 | int interlocutor_index; |
| 75 | challenge_t *challenge; |
76 | challenge_t *challenge; |
| 76 | HWND hParentWnd; |
77 | HWND hParentWnd; |
| 77 | int retval; |
78 | int retval; |
| 78 |
|
79 | //int error; |
| 79 | 80 | ||
| 80 | challenge_index = (int) thread_parms; |
81 | challenge_index = (int) thread_parms; |
| 81 | 82 | ||
| 82 | challenge = &challenges[challenge_index]; // quick access to challenge |
83 | challenge = &challenges[challenge_index]; // quick access to challenge |
| 83 | 84 | ||
| Line 90... | Line 91... | ||
| 90 | break; // break as soon as we find it |
91 | break; // break as soon as we find it |
| 91 | } |
92 | } |
| 92 | 93 | ||
| 93 | // display the dialog box |
94 | // display the dialog box |
| 94 | retval = DialogBoxParam (hAppInstance, MAKEINTRESOURCE (THIS_DIALOG), hParentWnd, DialogProc_ThisDialog, (LPARAM) challenge_index); |
95 | retval = DialogBoxParam (hAppInstance, MAKEINTRESOURCE (THIS_DIALOG), hParentWnd, DialogProc_ThisDialog, (LPARAM) challenge_index); |
| - | 96 | is_dialogbox_displayed = false; |
|
| 95 | error |
97 | //error = GetLastError (); |
| 96 | is_challengeaccepted = (retval != 0); |
98 | is_challengeaccepted = (retval != 0); |
| 97 | is_dialogbox_challenge_validated = true; |
99 | is_dialogbox_challenge_validated = true; |
| 98 | 100 | ||
| 99 | challenge = &challenges[challenge_index]; // restore access to challenge (it may have relocated !) |
101 | challenge = &challenges[challenge_index]; // restore access to challenge (it may have relocated !) |
| 100 | challenge->is_active = false; // remember challenge has gone away |
102 | challenge->is_active = false; // remember challenge has gone away |