winex11.drv: Support multiple adapter display settings in registry.
[wine.git] / programs / winecfg / appdefaults.c
blobdd3480cd635db6f26f604ea7fbbc211669b601cb
1 /*
2 * WineCfg app settings tabsheet
4 * Copyright 2004 Robert van Herk
5 * Copyright 2004 Chris Morgan
6 * Copyright 2004 Mike Hearn
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #define WIN32_LEAN_AND_MEAN
25 #include <windows.h>
26 #include <commdlg.h>
27 #include <wine/debug.h>
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <assert.h>
31 #include "wine/unicode.h"
32 #include "winecfg.h"
33 #include "resource.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
37 struct win_version
39 const char *szVersion;
40 const char *szDescription;
41 DWORD dwMajorVersion;
42 DWORD dwMinorVersion;
43 DWORD dwBuildNumber;
44 DWORD dwPlatformId;
45 const char *szCSDVersion;
46 WORD wServicePackMajor;
47 WORD wServicePackMinor;
48 const char *szProductType;
51 static const struct win_version win_versions[] =
53 { "win10", "Windows 10", 10, 0, 0x42EE,VER_PLATFORM_WIN32_NT, "", 0, 0, "WinNT"},
54 { "win81", "Windows 8.1", 6, 3, 0x2580,VER_PLATFORM_WIN32_NT, "", 0, 0, "WinNT"},
55 { "win8", "Windows 8", 6, 2, 0x23F0,VER_PLATFORM_WIN32_NT, "", 0, 0, "WinNT"},
56 { "win2008r2", "Windows 2008 R2", 6, 1, 0x1DB1,VER_PLATFORM_WIN32_NT, "Service Pack 1", 1, 0, "ServerNT"},
57 { "win7", "Windows 7", 6, 1, 0x1DB1,VER_PLATFORM_WIN32_NT, "Service Pack 1", 1, 0, "WinNT"},
58 { "win2008", "Windows 2008", 6, 0, 0x1772,VER_PLATFORM_WIN32_NT, "Service Pack 2", 2, 0, "ServerNT"},
59 { "vista", "Windows Vista", 6, 0, 0x1772,VER_PLATFORM_WIN32_NT, "Service Pack 2", 2, 0, "WinNT"},
60 { "win2003", "Windows 2003", 5, 2, 0xECE, VER_PLATFORM_WIN32_NT, "Service Pack 2", 2, 0, "ServerNT"},
61 #ifdef _WIN64
62 { "winxp64", "Windows XP", 5, 2, 0xECE, VER_PLATFORM_WIN32_NT, "Service Pack 2", 2, 0, "WinNT"},
63 #else
64 { "winxp", "Windows XP", 5, 1, 0xA28, VER_PLATFORM_WIN32_NT, "Service Pack 3", 3, 0, "WinNT"},
65 { "win2k", "Windows 2000", 5, 0, 0x893, VER_PLATFORM_WIN32_NT, "Service Pack 4", 4, 0, "WinNT"},
66 { "winme", "Windows ME", 4, 90, 0xBB8, VER_PLATFORM_WIN32_WINDOWS, " ", 0, 0, ""},
67 { "win98", "Windows 98", 4, 10, 0x8AE, VER_PLATFORM_WIN32_WINDOWS, " A ", 0, 0, ""},
68 { "win95", "Windows 95", 4, 0, 0x3B6, VER_PLATFORM_WIN32_WINDOWS, "", 0, 0, ""},
69 { "nt40", "Windows NT 4.0", 4, 0, 0x565, VER_PLATFORM_WIN32_NT, "Service Pack 6a", 6, 0, "WinNT"},
70 { "nt351", "Windows NT 3.51", 3, 51, 0x421, VER_PLATFORM_WIN32_NT, "Service Pack 5", 5, 0, "WinNT"},
71 { "win31", "Windows 3.1", 3, 10, 0, VER_PLATFORM_WIN32s, "Win32s 1.3", 0, 0, ""},
72 { "win30", "Windows 3.0", 3, 0, 0, VER_PLATFORM_WIN32s, "Win32s 1.3", 0, 0, ""},
73 { "win20", "Windows 2.0", 2, 0, 0, VER_PLATFORM_WIN32s, "Win32s 1.3", 0, 0, ""}
74 #endif
77 static const char szKey9x[] = "Software\\Microsoft\\Windows\\CurrentVersion";
78 static const char szKeyNT[] = "Software\\Microsoft\\Windows NT\\CurrentVersion";
79 static const char szKeyProdNT[] = "System\\CurrentControlSet\\Control\\ProductOptions";
81 static int get_registry_version(void)
83 int i, best = -1, platform, major, minor = 0, build = 0;
84 char *p, *ver, *type = NULL;
86 if ((ver = get_reg_key( HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", NULL )))
88 char *build_str;
90 platform = VER_PLATFORM_WIN32_NT;
92 build_str = get_reg_key( HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", NULL );
93 build = atoi(build_str);
95 type = get_reg_key( HKEY_LOCAL_MACHINE, szKeyProdNT, "ProductType", NULL );
97 else if ((ver = get_reg_key( HKEY_LOCAL_MACHINE, szKey9x, "VersionNumber", NULL )))
98 platform = VER_PLATFORM_WIN32_WINDOWS;
99 else
100 return -1;
102 if ((p = strchr( ver, '.' )))
104 char *minor_str = p;
105 *minor_str++ = 0;
106 if ((p = strchr( minor_str, '.' )))
108 char *build_str = p;
109 *build_str++ = 0;
110 build = atoi(build_str);
112 minor = atoi(minor_str);
114 major = atoi(ver);
116 for (i = 0; i < ARRAY_SIZE(win_versions); i++)
118 if (win_versions[i].dwPlatformId != platform) continue;
119 if (win_versions[i].dwMajorVersion != major) continue;
120 if (type && strcasecmp(win_versions[i].szProductType, type)) continue;
121 best = i;
122 if ((win_versions[i].dwMinorVersion == minor) &&
123 (win_versions[i].dwBuildNumber == build))
124 return i;
126 return best;
129 static void update_comboboxes(HWND dialog)
131 int i, ver;
132 char *winver;
134 /* retrieve the registry values */
135 winver = get_reg_key(config_key, keypath(""), "Version", "");
136 ver = get_registry_version();
138 if (!winver || !winver[0])
140 HeapFree(GetProcessHeap(), 0, winver);
142 if (current_app) /* no explicit setting */
144 WINE_TRACE("setting winver combobox to default\n");
145 SendDlgItemMessageW(dialog, IDC_WINVER, CB_SETCURSEL, 0, 0);
146 return;
148 if (ver != -1) winver = strdupA( win_versions[ver].szVersion );
149 else winver = strdupA("win7");
151 WINE_TRACE("winver is %s\n", winver);
153 /* normalize the version strings */
154 for (i = 0; i < ARRAY_SIZE(win_versions); i++)
156 if (!strcasecmp (win_versions[i].szVersion, winver))
158 SendDlgItemMessageW(dialog, IDC_WINVER, CB_SETCURSEL,
159 i + (current_app?1:0), 0);
160 WINE_TRACE("match with %s\n", win_versions[i].szVersion);
161 break;
165 HeapFree(GetProcessHeap(), 0, winver);
168 static void
169 init_comboboxes (HWND dialog)
171 int i;
173 SendDlgItemMessageW(dialog, IDC_WINVER, CB_RESETCONTENT, 0, 0);
175 /* add the default entries (automatic) which correspond to no setting */
176 if (current_app)
178 WCHAR str[256];
179 LoadStringW(GetModuleHandleW(NULL), IDS_USE_GLOBAL_SETTINGS, str, ARRAY_SIZE(str));
180 SendDlgItemMessageW (dialog, IDC_WINVER, CB_ADDSTRING, 0, (LPARAM)str);
183 for (i = 0; i < ARRAY_SIZE(win_versions); i++)
185 SendDlgItemMessageA(dialog, IDC_WINVER, CB_ADDSTRING,
186 0, (LPARAM) win_versions[i].szDescription);
190 static void add_listview_item(HWND listview, WCHAR *text, void *association)
192 LVITEMW item;
194 item.mask = LVIF_TEXT | LVIF_PARAM;
195 item.pszText = text;
196 item.cchTextMax = lstrlenW(text);
197 item.lParam = (LPARAM) association;
198 item.iItem = SendMessageW( listview, LVM_GETITEMCOUNT, 0, 0 );
199 item.iSubItem = 0;
201 SendMessageW(listview, LVM_INSERTITEMW, 0, (LPARAM) &item);
204 /* Called when the application is initialized (cannot reinit!) */
205 static void init_appsheet(HWND dialog)
207 HWND listview;
208 LVITEMW item;
209 HKEY key;
210 int i;
211 DWORD size;
212 WCHAR appname[1024];
214 WINE_TRACE("()\n");
216 listview = GetDlgItem(dialog, IDC_APP_LISTVIEW);
218 /* we use the lparam field of the item so we can alter the presentation later and not change code
219 * for instance, to use the tile view or to display the EXEs embedded 'display name' */
220 LoadStringW(GetModuleHandleW(NULL), IDS_DEFAULT_SETTINGS, appname, ARRAY_SIZE(appname));
221 add_listview_item(listview, appname, NULL);
223 /* because this list is only populated once, it's safe to bypass the settings list here */
224 if (RegOpenKeyA(config_key, "AppDefaults", &key) == ERROR_SUCCESS)
226 i = 0;
227 size = ARRAY_SIZE(appname);
228 while (RegEnumKeyExW (key, i, appname, &size, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
230 add_listview_item(listview, appname, strdupW(appname));
232 i++;
233 size = ARRAY_SIZE(appname);
236 RegCloseKey(key);
239 init_comboboxes(dialog);
241 /* Select the default settings listview item */
242 item.iItem = 0;
243 item.iSubItem = 0;
244 item.mask = LVIF_STATE;
245 item.state = LVIS_SELECTED | LVIS_FOCUSED;
246 item.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
248 SendMessageW(listview, LVM_SETITEMW, 0, (LPARAM) &item);
251 /* there has to be an easier way than this */
252 static int get_listview_selection(HWND listview)
254 int count = SendMessageW(listview, LVM_GETITEMCOUNT, 0, 0);
255 int i;
257 for (i = 0; i < count; i++)
259 if (SendMessageW( listview, LVM_GETITEMSTATE, i, LVIS_SELECTED )) return i;
262 return -1;
266 /* called when the user selects a different application */
267 static void on_selection_change(HWND dialog, HWND listview)
269 LVITEMW item;
270 WCHAR* oldapp = current_app;
272 WINE_TRACE("()\n");
274 item.iItem = get_listview_selection(listview);
275 item.iSubItem = 0;
276 item.mask = LVIF_PARAM;
278 WINE_TRACE("item.iItem=%d\n", item.iItem);
280 if (item.iItem == -1) return;
282 SendMessageW(listview, LVM_GETITEMW, 0, (LPARAM) &item);
284 current_app = (WCHAR*) item.lParam;
286 if (current_app)
288 WINE_TRACE("current_app is now %s\n", wine_dbgstr_w (current_app));
289 enable(IDC_APP_REMOVEAPP);
291 else
293 WINE_TRACE("current_app=NULL, editing global settings\n");
294 /* focus will never be on the button in this callback so it's safe */
295 disable(IDC_APP_REMOVEAPP);
298 /* reset the combo boxes if we changed from/to global/app-specific */
300 if ((oldapp && !current_app) || (!oldapp && current_app))
301 init_comboboxes(dialog);
303 update_comboboxes(dialog);
305 set_window_title(dialog);
308 static BOOL list_contains_file(HWND listview, WCHAR *filename)
310 LVFINDINFOW find_info = { LVFI_STRING, filename, 0, {0, 0}, 0 };
311 int index;
313 index = ListView_FindItemW(listview, -1, &find_info);
315 return (index != -1);
318 static void on_add_app_click(HWND dialog)
320 static const WCHAR filterW[] = {'%','s','%','c','*','.','e','x','e',';','*','.','e','x','e','.','s','o','%','c',0};
321 WCHAR filetitle[MAX_PATH];
322 WCHAR file[MAX_PATH];
323 WCHAR programsFilter[100], filter[MAX_PATH];
324 WCHAR selectExecutableStr[100];
325 static const WCHAR pathC[] = { 'c',':','\\',0 };
327 OPENFILENAMEW ofn = { sizeof(OPENFILENAMEW),
328 dialog, /*hInst*/0, 0, NULL, 0, 0, NULL,
329 0, NULL, 0, pathC, 0,
330 OFN_SHOWHELP | OFN_HIDEREADONLY | OFN_ENABLESIZING,
331 0, 0, NULL, 0, NULL };
333 LoadStringW (GetModuleHandleW(NULL), IDS_SELECT_EXECUTABLE, selectExecutableStr,
334 ARRAY_SIZE(selectExecutableStr));
335 LoadStringW (GetModuleHandleW(NULL), IDS_EXECUTABLE_FILTER, programsFilter,
336 ARRAY_SIZE(programsFilter));
337 snprintfW( filter, MAX_PATH, filterW, programsFilter, 0, 0 );
339 ofn.lpstrTitle = selectExecutableStr;
340 ofn.lpstrFilter = filter;
341 ofn.lpstrFileTitle = filetitle;
342 ofn.lpstrFileTitle[0] = '\0';
343 ofn.nMaxFileTitle = ARRAY_SIZE(filetitle);
344 ofn.lpstrFile = file;
345 ofn.lpstrFile[0] = '\0';
346 ofn.nMaxFile = ARRAY_SIZE(file);
348 if (GetOpenFileNameW (&ofn))
350 HWND listview = GetDlgItem(dialog, IDC_APP_LISTVIEW);
351 int count = SendMessageW(listview, LVM_GETITEMCOUNT, 0, 0);
352 WCHAR* new_app;
353 LVITEMW item;
355 if (list_contains_file(listview, filetitle))
356 return;
358 new_app = strdupW(filetitle);
360 WINE_TRACE("adding %s\n", wine_dbgstr_w (new_app));
362 add_listview_item(listview, new_app, new_app);
364 item.mask = LVIF_STATE;
365 item.state = LVIS_SELECTED | LVIS_FOCUSED;
366 item.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
367 SendMessageW(listview, LVM_SETITEMSTATE, count, (LPARAM)&item );
369 SetFocus(listview);
371 else WINE_TRACE("user cancelled\n");
374 static void on_remove_app_click(HWND dialog)
376 HWND listview = GetDlgItem(dialog, IDC_APP_LISTVIEW);
377 int selection = get_listview_selection(listview);
378 LVITEMW item;
380 item.iItem = selection;
381 item.iSubItem = 0;
382 item.mask = LVIF_PARAM;
384 WINE_TRACE("selection=%d\n", selection);
386 assert( selection != 0 ); /* user cannot click this button when "default settings" is selected */
388 set_reg_key(config_key, keypath(""), NULL, NULL); /* delete the section */
389 SendMessageW(listview, LVM_GETITEMW, 0, (LPARAM) &item);
390 HeapFree (GetProcessHeap(), 0, (void*)item.lParam);
391 SendMessageW(listview, LVM_DELETEITEM, selection, 0);
392 item.mask = LVIF_STATE;
393 item.state = LVIS_SELECTED | LVIS_FOCUSED;
394 item.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
395 SendMessageW(listview, LVM_SETITEMSTATE, 0, (LPARAM)&item);
397 SetFocus(listview);
398 SendMessageW(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0);
401 static void set_winver(const struct win_version *version)
403 static const char szKeyWindNT[] = "System\\CurrentControlSet\\Control\\Windows";
404 static const char szKeyEnvNT[] = "System\\CurrentControlSet\\Control\\Session Manager\\Environment";
405 char Buffer[40];
407 switch (version->dwPlatformId)
409 case VER_PLATFORM_WIN32_WINDOWS:
410 snprintf(Buffer, sizeof(Buffer), "%d.%d.%d", version->dwMajorVersion,
411 version->dwMinorVersion, version->dwBuildNumber);
412 set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "VersionNumber", Buffer);
413 set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "SubVersionNumber", version->szCSDVersion);
414 snprintf(Buffer, sizeof(Buffer), "Microsoft %s", version->szDescription);
415 set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "ProductName", Buffer);
417 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CSDVersion", NULL);
418 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", NULL);
419 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMajorVersionNumber", NULL);
420 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMinorVersionNumber", NULL);
421 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuild", NULL);
422 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", NULL);
423 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "ProductName", NULL);
424 set_reg_key(HKEY_LOCAL_MACHINE, szKeyProdNT, "ProductType", NULL);
425 set_reg_key(HKEY_LOCAL_MACHINE, szKeyWindNT, "CSDVersion", NULL);
426 set_reg_key(HKEY_LOCAL_MACHINE, szKeyEnvNT, "OS", NULL);
427 set_reg_key(config_key, keypath(""), "Version", NULL);
428 break;
430 case VER_PLATFORM_WIN32_NT:
431 snprintf(Buffer, sizeof(Buffer), "%d.%d", version->dwMajorVersion,
432 version->dwMinorVersion);
433 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", Buffer);
434 set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMajorVersionNumber", version->dwMajorVersion);
435 set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMinorVersionNumber", version->dwMinorVersion);
436 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CSDVersion", version->szCSDVersion);
437 snprintf(Buffer, sizeof(Buffer), "%d", version->dwBuildNumber);
438 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuild", Buffer);
439 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", Buffer);
440 snprintf(Buffer, sizeof(Buffer), "Microsoft %s", version->szDescription);
441 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "ProductName", Buffer);
442 set_reg_key(HKEY_LOCAL_MACHINE, szKeyProdNT, "ProductType", version->szProductType);
443 set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyWindNT, "CSDVersion",
444 MAKEWORD( version->wServicePackMinor,
445 version->wServicePackMajor ));
446 set_reg_key(HKEY_LOCAL_MACHINE, szKeyEnvNT, "OS", "Windows_NT");
448 set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "VersionNumber", NULL);
449 set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "SubVersionNumber", NULL);
450 set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "ProductName", NULL);
451 set_reg_key(config_key, keypath(""), "Version", NULL);
452 break;
454 case VER_PLATFORM_WIN32s:
455 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CSDVersion", NULL);
456 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", NULL);
457 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuild", NULL);
458 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", NULL);
459 set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "ProductName", NULL);
460 set_reg_key(HKEY_LOCAL_MACHINE, szKeyProdNT, "ProductType", NULL);
461 set_reg_key(HKEY_LOCAL_MACHINE, szKeyWindNT, "CSDVersion", NULL);
462 set_reg_key(HKEY_LOCAL_MACHINE, szKeyEnvNT, "OS", NULL);
463 set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "VersionNumber", NULL);
464 set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "SubVersionNumber", NULL);
465 set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, "ProductName", NULL);
466 set_reg_key(config_key, keypath(""), "Version", version->szVersion);
467 break;
471 BOOL set_winver_from_string(const char *version)
473 int i;
475 WINE_TRACE("desired winver: '%s'\n", version);
477 for (i = 0; i < ARRAY_SIZE(win_versions); i++)
479 if (!lstrcmpiA(win_versions[i].szVersion, version))
481 WINE_TRACE("match with %s\n", win_versions[i].szVersion);
482 set_winver(&win_versions[i]);
483 apply();
484 return TRUE;
488 return FALSE;
491 void print_windows_versions(void)
493 int i;
495 for (i = 0; i < ARRAY_SIZE(win_versions); i++)
497 printf(" %10s %s\n", win_versions[i].szVersion, win_versions[i].szDescription);
501 static void on_winver_change(HWND dialog)
503 int selection = SendDlgItemMessageW(dialog, IDC_WINVER, CB_GETCURSEL, 0, 0);
505 if (current_app)
507 if (!selection)
509 WINE_TRACE("default selected so removing current setting\n");
510 set_reg_key(config_key, keypath(""), "Version", NULL);
512 else
514 WINE_TRACE("setting Version key to value '%s'\n", win_versions[selection-1].szVersion);
515 set_reg_key(config_key, keypath(""), "Version", win_versions[selection-1].szVersion);
518 else /* global version only */
520 set_winver(&win_versions[selection]);
523 /* enable the apply button */
524 SendMessageW(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0);
527 INT_PTR CALLBACK
528 AppDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
530 switch (uMsg)
532 case WM_INITDIALOG:
533 init_appsheet(hDlg);
534 break;
536 case WM_SHOWWINDOW:
537 set_window_title(hDlg);
538 break;
540 case WM_NOTIFY:
541 switch (((LPNMHDR)lParam)->code)
543 case LVN_ITEMCHANGED:
544 on_selection_change(hDlg, GetDlgItem(hDlg, IDC_APP_LISTVIEW));
545 break;
546 case PSN_APPLY:
547 apply();
548 SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
549 break;
552 break;
554 case WM_COMMAND:
555 switch(HIWORD(wParam))
557 case CBN_SELCHANGE:
558 switch(LOWORD(wParam))
560 case IDC_WINVER:
561 on_winver_change(hDlg);
562 break;
564 case BN_CLICKED:
565 switch(LOWORD(wParam))
567 case IDC_APP_ADDAPP:
568 on_add_app_click(hDlg);
569 break;
570 case IDC_APP_REMOVEAPP:
571 on_remove_app_click(hDlg);
572 break;
574 break;
577 break;
580 return 0;