Rev 83 | Rev 88 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 83 | Rev 85 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | // dialog template |
6 | // dialog template |
7 | #define THIS_DIALOG DIALOG_REGISTER |
7 | #define THIS_DIALOG DIALOG_REGISTER |
8 | 8 | ||
9 | 9 | ||
10 | // global variables used in this module only |
10 | // global variables used in this module only |
11 | static bool was_donatebutton_clicked = false; |
- | |
12 | static wchar_t candidate_email[128] = L""; |
11 | static wchar_t candidate_email[128] = L""; |
13 | static unsigned __int32 candidate_code = 0; // 32 bits |
12 | static unsigned __int32 candidate_code = 0; // 32 bits |
14 | 13 | ||
15 | 14 | ||
16 | // prototypes of local functions |
15 | // prototypes of local functions |
Line 92... | Line 91... | ||
92 | // else did we take action on one of the controls ? |
91 | // else did we take action on one of the controls ? |
93 | else if (message == WM_COMMAND) |
92 | else if (message == WM_COMMAND) |
94 | { |
93 | { |
95 | // did we cancel the dialog box ? (IDCANCEL is a system-wide dialog box handler value, that catches the ESC key) |
94 | // did we cancel the dialog box ? (IDCANCEL is a system-wide dialog box handler value, that catches the ESC key) |
96 | if (wParam_loword == IDCANCEL) |
95 | if (wParam_loword == IDCANCEL) |
97 | { |
- | |
98 | // was the donate button clicked ? |
- | |
99 | if (was_donatebutton_clicked) |
- | |
100 | { |
- | |
101 | // did the user fill in his email address ? |
- | |
102 | } |
- | |
103 | EndDialog (hWnd, 0); // close the dialog box |
96 | EndDialog (hWnd, 0); // close the dialog box |
104 | } |
- | |
105 | 97 | ||
106 | // else did the user enter something in the edit boxes ? |
98 | // else did the user enter something in the edit boxes ? |
107 | else if (wParam_hiword == EN_CHANGE) |
99 | else if (wParam_hiword == EN_CHANGE) |
108 | { |
100 | { |
109 | // enable the validation button only if the PayPal email field has data |
101 | // enable the validation button only if the PayPal email field has data |
Line 152... | Line 144... | ||
152 | } |
144 | } |
153 | } |
145 | } |
154 | 146 | ||
155 | // else was it the PayPal button ? |
147 | // else was it the PayPal button ? |
156 | else if (wParam_loword == BUTTON_DONATE) |
148 | else if (wParam_loword == BUTTON_DONATE) |
157 | { |
- | |
158 | ShellExecute (NULL, L"open", PAYPAL_URL, NULL, NULL, SW_MAXIMIZE); // open PayPal in the default browser, maximized |
149 | ShellExecute (NULL, L"open", PAYPAL_URL, NULL, NULL, SW_MAXIMIZE); // open PayPal in the default browser, maximized |
159 | was_donatebutton_clicked = true; // remember the donate button was clicked |
- | |
160 | } |
- | |
161 | 150 | ||
162 | // else was it the "no PayPal" hyperlink ? |
151 | // else was it the "no PayPal" hyperlink ? |
163 | else if (wParam_loword == STATICTEXT_REGISTRATION_NOPAYPAL) |
152 | else if (wParam_loword == STATICTEXT_REGISTRATION_NOPAYPAL) |
164 | ShellExecute (NULL, L"open", NOPAYPAL_URL, NULL, NULL, SW_MAXIMIZE); // open the bank account page in the default browser, maximized |
153 | ShellExecute (NULL, L"open", NOPAYPAL_URL, NULL, NULL, SW_MAXIMIZE); // open the bank account page in the default browser, maximized |
165 | 154 |