1 |
douglas |
63 |
// Renegade Map Selector |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// RenegadeMapSelector.cpp |
6 |
|
|
|
7 |
douglas |
75 |
#include "RenegadeMapSelector.h" |
8 |
|
|
#include "RenegadeConfig.h" |
9 |
|
|
|
10 |
douglas |
66 |
#ifdef _WIN32 |
11 |
|
|
#include <io.h> |
12 |
|
|
#include <fcntl.h> |
13 |
douglas |
67 |
#include "resource.h" |
14 |
douglas |
75 |
#else |
15 |
|
|
#include "gtk/gtk.h" |
16 |
douglas |
66 |
#endif |
17 |
|
|
|
18 |
douglas |
63 |
bool debug = false; |
19 |
|
|
string program; |
20 |
douglas |
67 |
RenegadeConfig* config; |
21 |
douglas |
63 |
|
22 |
douglas |
66 |
#ifndef _WIN32 |
23 |
|
|
inline string fix(const string& ansi) { return ansi; } |
24 |
douglas |
73 |
inline void munge(void) { debug = true; } |
25 |
douglas |
66 |
#else |
26 |
|
|
inline string fix(const wstring& wide) |
27 |
douglas |
63 |
{ |
28 |
|
|
char* buffer = new char[wide.length() + 1]; |
29 |
|
|
|
30 |
|
|
WideCharToMultiByte(CP_ACP, 0, wide.c_str(), -1, buffer, wide.length() + 1, |
31 |
|
|
NULL, NULL); |
32 |
|
|
|
33 |
|
|
string ansi = buffer; |
34 |
|
|
delete [] buffer; |
35 |
|
|
|
36 |
|
|
return ansi; |
37 |
|
|
} |
38 |
|
|
|
39 |
douglas |
67 |
inline void munge(void) |
40 |
douglas |
66 |
{ |
41 |
douglas |
67 |
if (debug) return; |
42 |
|
|
|
43 |
douglas |
66 |
AllocConsole(); |
44 |
|
|
SetConsoleTitle("Renegade Map Selector"); |
45 |
|
|
|
46 |
|
|
int hin = _open_osfhandle(long(GetStdHandle(STD_INPUT_HANDLE)), _O_TEXT); |
47 |
|
|
int hout = _open_osfhandle(long(GetStdHandle(STD_OUTPUT_HANDLE)), _O_TEXT); |
48 |
|
|
int herr = _open_osfhandle(long(GetStdHandle(STD_ERROR_HANDLE)), _O_TEXT); |
49 |
|
|
|
50 |
|
|
FILE* fin = _fdopen(hin, "r"); |
51 |
|
|
FILE* fout = _fdopen(hout, "w"); |
52 |
|
|
FILE* ferr = _fdopen(herr, "w"); |
53 |
|
|
|
54 |
|
|
*stdin = *fin; |
55 |
|
|
*stdout = *fout; |
56 |
|
|
*stderr = *ferr; |
57 |
|
|
|
58 |
|
|
setvbuf(stdin, NULL, _IONBF, 0); |
59 |
|
|
setvbuf(stdout, NULL, _IONBF, 0); |
60 |
|
|
setvbuf(stderr, NULL, _IONBF, 0); |
61 |
|
|
|
62 |
|
|
cin.sync_with_stdio(); |
63 |
|
|
cout.sync_with_stdio(); |
64 |
|
|
cerr.sync_with_stdio(); |
65 |
douglas |
67 |
|
66 |
|
|
debug = true; |
67 |
douglas |
66 |
} |
68 |
|
|
#endif |
69 |
|
|
|
70 |
douglas |
73 |
#ifdef _WIN32 |
71 |
douglas |
63 |
int CALLBACK selector(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); |
72 |
|
|
|
73 |
|
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR |
74 |
|
|
lpCmdLine, int nShowCmd) |
75 |
|
|
{ |
76 |
|
|
int argc; |
77 |
|
|
unsigned short** argv = CommandLineToArgvW(GetCommandLineW(), &argc); |
78 |
douglas |
73 |
#else |
79 |
|
|
int main(int argc, char* argv[]) |
80 |
|
|
{ |
81 |
douglas |
75 |
gtk_init(&argc, &argv); |
82 |
douglas |
73 |
#endif |
83 |
douglas |
63 |
|
84 |
douglas |
68 |
string error; |
85 |
douglas |
67 |
string file = "svrcfg_cnc.ini"; |
86 |
|
|
|
87 |
douglas |
66 |
program = fix(argv[0]); |
88 |
douglas |
63 |
|
89 |
|
|
for (int index = 1; index < argc; index++) |
90 |
|
|
{ |
91 |
douglas |
66 |
string arg = fix(argv[index]); |
92 |
douglas |
63 |
|
93 |
|
|
if (arg == "-D") |
94 |
|
|
{ |
95 |
douglas |
67 |
munge(); |
96 |
douglas |
63 |
} |
97 |
douglas |
67 |
else if (arg == "-file") |
98 |
|
|
{ |
99 |
|
|
if (++index < argc) |
100 |
|
|
{ |
101 |
|
|
file = fix(argv[index]); |
102 |
|
|
} |
103 |
|
|
else |
104 |
|
|
{ |
105 |
|
|
error = "The argument -file must be followed by a filename."; |
106 |
|
|
|
107 |
douglas |
73 |
#ifdef _WIN32 |
108 |
douglas |
67 |
MessageBox(NULL, error.c_str(), "Bad Arguments", MB_ICONERROR); |
109 |
douglas |
73 |
#endif |
110 |
douglas |
67 |
return 1; |
111 |
|
|
} |
112 |
|
|
} |
113 |
douglas |
63 |
} |
114 |
|
|
|
115 |
douglas |
73 |
#ifdef _WIN32 |
116 |
douglas |
67 |
GlobalFree(argv); |
117 |
douglas |
73 |
#endif |
118 |
douglas |
63 |
|
119 |
douglas |
67 |
if (debug) cerr << "file = " << file << "\n"; |
120 |
|
|
|
121 |
|
|
config = new RenegadeConfig(file); |
122 |
douglas |
68 |
if (!config->load()) |
123 |
|
|
{ |
124 |
|
|
error = "Could not open " + file + "."; |
125 |
douglas |
67 |
|
126 |
douglas |
73 |
#ifdef _WIN32 |
127 |
douglas |
68 |
MessageBox(NULL, error.c_str(), "Bad File", MB_ICONERROR); |
128 |
douglas |
73 |
#endif |
129 |
douglas |
68 |
return 1; |
130 |
|
|
} |
131 |
|
|
|
132 |
douglas |
73 |
#ifdef _WIN32 |
133 |
douglas |
63 |
DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAP_SELECTOR), NULL, selector); |
134 |
douglas |
75 |
#else |
135 |
|
|
gtk_main(); |
136 |
douglas |
73 |
#endif |
137 |
douglas |
63 |
|
138 |
douglas |
67 |
delete config; |
139 |
|
|
|
140 |
douglas |
73 |
#ifdef _WIN32 |
141 |
douglas |
70 |
if (debug) |
142 |
|
|
{ |
143 |
|
|
cout << "Press enter key to exit . . ."; |
144 |
|
|
cin.get(); |
145 |
|
|
} |
146 |
douglas |
73 |
#endif |
147 |
douglas |
68 |
|
148 |
douglas |
63 |
return 0; |
149 |
|
|
} |
150 |
|
|
|
151 |
douglas |
73 |
#ifdef _WIN32 |
152 |
douglas |
63 |
int CALLBACK selector(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
153 |
|
|
{ |
154 |
|
|
switch (uMsg) |
155 |
|
|
{ |
156 |
|
|
case WM_INITDIALOG: |
157 |
|
|
{ |
158 |
|
|
RECT rc, rcDlg, rcDesktop; |
159 |
|
|
|
160 |
|
|
GetWindowRect(GetDesktopWindow(), &rcDesktop); |
161 |
|
|
GetWindowRect(hwndDlg, &rcDlg); |
162 |
|
|
CopyRect(&rc, &rcDesktop); |
163 |
|
|
|
164 |
|
|
OffsetRect(&rcDlg, -rcDlg.left, -rcDlg.top); |
165 |
|
|
OffsetRect(&rc, -rc.left, -rc.top); |
166 |
|
|
OffsetRect(&rc, -rcDlg.right, -rcDlg.bottom); |
167 |
|
|
|
168 |
|
|
SetWindowPos(hwndDlg, HWND_TOP, rcDesktop.left + (rc.right / 2), |
169 |
|
|
rcDesktop.top + (rc.bottom / 2), 0, 0, SWP_NOSIZE); |
170 |
|
|
} |
171 |
|
|
{ |
172 |
|
|
char* directory = new char[MAX_PATH + 1]; |
173 |
|
|
GetCurrentDirectory(MAX_PATH + 1, directory); |
174 |
douglas |
66 |
if (debug) cerr << "directory = " << directory << "\n"; |
175 |
douglas |
63 |
|
176 |
|
|
char* data = new char[MAX_PATH + 1]; |
177 |
|
|
sprintf(data, "%s\\data\\*.mix", directory); |
178 |
|
|
delete [] directory; |
179 |
douglas |
66 |
if (debug) cerr << "data = " << data << "\n"; |
180 |
douglas |
63 |
|
181 |
|
|
DlgDirList(hwndDlg, data, IDC_AVAILABLE, 0, DDL_ARCHIVE); |
182 |
douglas |
68 |
SetCurrentDirectory(".."); |
183 |
douglas |
63 |
|
184 |
|
|
delete [] data; |
185 |
|
|
} |
186 |
douglas |
69 |
{ |
187 |
|
|
vector<string> maps = config->getMaps(); |
188 |
|
|
|
189 |
|
|
for (unsigned index = 0; index < maps.size(); index++) |
190 |
|
|
{ |
191 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), LB_ADDSTRING, 0, |
192 |
|
|
long(maps[index].c_str())); |
193 |
|
|
} |
194 |
|
|
} |
195 |
douglas |
63 |
break; |
196 |
|
|
case WM_COMMAND: |
197 |
|
|
switch (LOWORD(wParam)) |
198 |
|
|
{ |
199 |
|
|
case IDOK: |
200 |
douglas |
69 |
if (GetListBoxInfo(GetDlgItem(hwndDlg, IDC_SELECTED)) == 0) |
201 |
|
|
{ |
202 |
|
|
MessageBox(hwndDlg, "You need at least one map.", "No Maps", |
203 |
|
|
MB_ICONEXCLAMATION); |
204 |
|
|
|
205 |
|
|
return false; |
206 |
|
|
} |
207 |
|
|
else |
208 |
|
|
{ |
209 |
|
|
vector<string> maps; |
210 |
|
|
|
211 |
|
|
for (unsigned index = 0; index < GetListBoxInfo(GetDlgItem( |
212 |
|
|
hwndDlg, IDC_SELECTED)); index++) |
213 |
|
|
{ |
214 |
|
|
char* name = new char[SendMessage(GetDlgItem(hwndDlg, |
215 |
|
|
IDC_SELECTED), LB_GETTEXTLEN, index, 0) + 1]; |
216 |
|
|
|
217 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), LB_GETTEXT, |
218 |
|
|
index, long(name)); |
219 |
|
|
maps.push_back(name); |
220 |
|
|
|
221 |
|
|
delete [] name; |
222 |
|
|
} |
223 |
|
|
|
224 |
|
|
config->setMaps(maps); |
225 |
|
|
} |
226 |
douglas |
67 |
config->save(); |
227 |
douglas |
63 |
case IDCANCEL: |
228 |
|
|
EndDialog(hwndDlg, wParam); |
229 |
|
|
return true; |
230 |
douglas |
69 |
case IDC_ADD_MAP: |
231 |
douglas |
70 |
{ |
232 |
|
|
unsigned count = SendMessage(GetDlgItem(hwndDlg, |
233 |
|
|
IDC_AVAILABLE), LB_GETSELCOUNT, 0, 0); |
234 |
|
|
unsigned* additions = new unsigned[count]; |
235 |
|
|
|
236 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_AVAILABLE), LB_GETSELITEMS, |
237 |
|
|
count, long(additions)); |
238 |
|
|
|
239 |
|
|
if (debug) cerr << "additions = {\n"; |
240 |
|
|
for (unsigned index = 0; index < count; index++) |
241 |
|
|
{ |
242 |
|
|
if (debug) cerr << " [" << index << "] = " << |
243 |
|
|
additions[index] << "\n"; |
244 |
|
|
|
245 |
|
|
char* name = new char[SendMessage(GetDlgItem(hwndDlg, |
246 |
|
|
IDC_AVAILABLE), LB_GETTEXTLEN, additions[index], 0) + 1 |
247 |
|
|
]; |
248 |
|
|
|
249 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_AVAILABLE), LB_GETTEXT, |
250 |
|
|
additions[index], long(name)); |
251 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
252 |
|
|
LB_ADDSTRING, 0, long(name)); |
253 |
|
|
|
254 |
|
|
delete [] name; |
255 |
|
|
} |
256 |
|
|
if (debug) cerr << "}\n"; |
257 |
|
|
|
258 |
|
|
delete [] additions; |
259 |
|
|
|
260 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_AVAILABLE), LB_SETSEL, |
261 |
|
|
false, -1); |
262 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_ADD_MAP), false); |
263 |
|
|
} |
264 |
douglas |
69 |
break; |
265 |
|
|
case IDC_REMOVE_MAP: |
266 |
douglas |
70 |
{ |
267 |
|
|
unsigned count = SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
268 |
|
|
LB_GETSELCOUNT, 0, 0); |
269 |
|
|
unsigned* removals = new unsigned[count]; |
270 |
|
|
|
271 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), LB_GETSELITEMS, |
272 |
|
|
count, long(removals)); |
273 |
|
|
|
274 |
|
|
if (debug) cerr << "removals = {\n"; |
275 |
|
|
for (unsigned index = count; index > 0; index--) |
276 |
|
|
{ |
277 |
|
|
if (debug) cerr << " [" << index - 1 << "] = " << |
278 |
|
|
removals[index - 1] << "\n"; |
279 |
|
|
|
280 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
281 |
|
|
LB_DELETESTRING, removals[index - 1], 0); |
282 |
|
|
} |
283 |
|
|
if (debug) cerr << "}\n"; |
284 |
|
|
|
285 |
|
|
delete [] removals; |
286 |
|
|
|
287 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE_MAP), false); |
288 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_UP_MAP), false); |
289 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_DOWN_MAP), false); |
290 |
|
|
} |
291 |
douglas |
69 |
break; |
292 |
|
|
case IDC_UP_MAP: |
293 |
douglas |
74 |
{ |
294 |
|
|
unsigned count = SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
295 |
|
|
LB_GETSELCOUNT, 0, 0); |
296 |
|
|
unsigned* ups = new unsigned[count]; |
297 |
|
|
|
298 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), LB_GETSELITEMS, |
299 |
|
|
count, long(ups)); |
300 |
|
|
|
301 |
|
|
unsigned insert = ups[0] - 1; |
302 |
|
|
|
303 |
|
|
if (debug) cerr << "ups = {\n"; |
304 |
|
|
for (unsigned index = 0; index < count; index++) |
305 |
|
|
{ |
306 |
|
|
if (debug) cerr << " [" << index << "] = " << ups[index] |
307 |
|
|
<< "\n"; |
308 |
|
|
|
309 |
|
|
char* up = new char[SendMessage(GetDlgItem(hwndDlg, |
310 |
|
|
IDC_SELECTED), LB_GETTEXTLEN, ups[index], 0) + 1]; |
311 |
|
|
|
312 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), LB_GETTEXT, |
313 |
|
|
ups[index], long(up)); |
314 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
315 |
|
|
LB_DELETESTRING, ups[index], 0); |
316 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
317 |
|
|
LB_INSERTSTRING, insert, long(up)); |
318 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), LB_SETSEL, |
319 |
|
|
true, insert++); |
320 |
|
|
} |
321 |
|
|
if (debug) cerr << "}\n"; |
322 |
|
|
|
323 |
|
|
delete [] ups; |
324 |
|
|
|
325 |
|
|
if (SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
326 |
|
|
LB_GETSEL, 0, 0) == 0) |
327 |
|
|
{ |
328 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_UP_MAP), true); |
329 |
|
|
} |
330 |
|
|
else |
331 |
|
|
{ |
332 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_UP_MAP), false); |
333 |
|
|
} |
334 |
|
|
|
335 |
|
|
if (SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
336 |
|
|
LB_GETSEL, SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED |
337 |
|
|
), LB_GETCOUNT, 0, 0) - 1, 0) == 0) |
338 |
|
|
{ |
339 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_DOWN_MAP), true); |
340 |
|
|
} |
341 |
|
|
} |
342 |
douglas |
69 |
break; |
343 |
|
|
case IDC_DOWN_MAP: |
344 |
douglas |
74 |
{ |
345 |
|
|
unsigned count = SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
346 |
|
|
LB_GETSELCOUNT, 0, 0); |
347 |
|
|
unsigned* downs = new unsigned[count]; |
348 |
|
|
|
349 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), LB_GETSELITEMS, |
350 |
|
|
count, long(downs)); |
351 |
|
|
|
352 |
|
|
unsigned insert = downs[count - 1] + 1; |
353 |
|
|
|
354 |
|
|
if (debug) cerr << "downs = {\n"; |
355 |
|
|
for (unsigned index = count; index > 0; index--) |
356 |
|
|
{ |
357 |
|
|
if (debug) cerr << " [" << index << "] = " << downs[index |
358 |
|
|
- 1] << "\n"; |
359 |
|
|
|
360 |
|
|
char* down = new char[SendMessage(GetDlgItem(hwndDlg, |
361 |
|
|
IDC_SELECTED), LB_GETTEXTLEN, downs[index - 1], 0) + |
362 |
|
|
1]; |
363 |
|
|
|
364 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), LB_GETTEXT, |
365 |
|
|
downs[index - 1], long(down)); |
366 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
367 |
|
|
LB_DELETESTRING, downs[index - 1], 0); |
368 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
369 |
|
|
LB_INSERTSTRING, insert, long(down)); |
370 |
|
|
SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), LB_SETSEL, |
371 |
|
|
true, insert--); |
372 |
|
|
} |
373 |
|
|
if (debug) cerr << "}\n"; |
374 |
|
|
|
375 |
|
|
delete [] downs; |
376 |
|
|
|
377 |
|
|
if (SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
378 |
|
|
LB_GETSEL, 0, 0) == 0) |
379 |
|
|
{ |
380 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_UP_MAP), true); |
381 |
|
|
} |
382 |
|
|
|
383 |
|
|
if (SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
384 |
|
|
LB_GETSEL, SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED |
385 |
|
|
), LB_GETCOUNT, 0, 0) - 1, 0) == 0) |
386 |
|
|
{ |
387 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_DOWN_MAP), true); |
388 |
|
|
} |
389 |
|
|
else |
390 |
|
|
{ |
391 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_DOWN_MAP), false); |
392 |
|
|
} |
393 |
|
|
} |
394 |
douglas |
69 |
break; |
395 |
|
|
case IDC_AVAILABLE: |
396 |
|
|
switch (HIWORD(wParam)) |
397 |
|
|
{ |
398 |
|
|
case LBN_SELCHANGE: |
399 |
|
|
if (SendMessage(GetDlgItem(hwndDlg, IDC_AVAILABLE), |
400 |
|
|
LB_GETSELCOUNT, 0, 0) > 0) |
401 |
|
|
{ |
402 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_ADD_MAP), true); |
403 |
|
|
} |
404 |
|
|
else |
405 |
|
|
{ |
406 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_ADD_MAP), false); |
407 |
|
|
} |
408 |
|
|
break; |
409 |
|
|
} |
410 |
|
|
break; |
411 |
|
|
case IDC_SELECTED: |
412 |
|
|
switch (HIWORD(wParam)) |
413 |
|
|
{ |
414 |
|
|
case LBN_SELCHANGE: |
415 |
|
|
if (SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
416 |
|
|
LB_GETSELCOUNT, 0, 0) > 0) |
417 |
|
|
{ |
418 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE_MAP), true); |
419 |
|
|
|
420 |
|
|
if (SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
421 |
|
|
LB_GETSEL, 0, 0) == 0) |
422 |
|
|
{ |
423 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_UP_MAP), true); |
424 |
|
|
} |
425 |
|
|
else |
426 |
|
|
{ |
427 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_UP_MAP), false); |
428 |
|
|
} |
429 |
|
|
|
430 |
|
|
if (SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED), |
431 |
|
|
LB_GETSEL, SendMessage(GetDlgItem(hwndDlg, IDC_SELECTED |
432 |
|
|
), LB_GETCOUNT, 0, 0) - 1, 0) == 0) |
433 |
|
|
{ |
434 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_DOWN_MAP), true); |
435 |
|
|
} |
436 |
|
|
else |
437 |
|
|
{ |
438 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_DOWN_MAP), false); |
439 |
|
|
} |
440 |
|
|
} |
441 |
|
|
else |
442 |
|
|
{ |
443 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE_MAP), false); |
444 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_UP_MAP), false); |
445 |
|
|
EnableWindow(GetDlgItem(hwndDlg, IDC_DOWN_MAP), false); |
446 |
|
|
} |
447 |
|
|
break; |
448 |
|
|
} |
449 |
|
|
break; |
450 |
douglas |
63 |
} |
451 |
|
|
break; |
452 |
|
|
} |
453 |
|
|
|
454 |
|
|
return false; |
455 |
|
|
} |
456 |
douglas |
73 |
#endif |