2003-09-30 02:27:55 +02:00
|
|
|
/*
|
2004-02-07 02:01:34 +01:00
|
|
|
* WineCfg app settings tabsheet
|
2003-09-30 02:27:55 +02:00
|
|
|
*
|
2004-02-07 02:01:34 +01:00
|
|
|
* Copyright 2004 Robert van Herk
|
2004-09-28 05:16:43 +02:00
|
|
|
* Copyright 2004 Chris Morgan
|
|
|
|
* Copyright 2004 Mike Hearn
|
2003-09-30 02:27:55 +02:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2003-09-30 02:27:55 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2006-01-16 20:41:34 +01:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2004-02-07 02:01:34 +01:00
|
|
|
#include <windows.h>
|
|
|
|
#include <commdlg.h>
|
|
|
|
#include <wine/debug.h>
|
2003-09-30 02:27:55 +02:00
|
|
|
#include <stdio.h>
|
2006-11-30 15:16:41 +01:00
|
|
|
#include <stdlib.h>
|
2004-09-28 05:16:43 +02:00
|
|
|
#include <assert.h>
|
2020-09-01 00:11:39 +02:00
|
|
|
#include "wine/heap.h"
|
2003-09-30 02:27:55 +02:00
|
|
|
#include "winecfg.h"
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
|
|
|
|
|
2020-04-16 16:06:27 +02:00
|
|
|
struct win_version
|
2005-08-17 13:37:34 +02:00
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
const WCHAR *szVersion;
|
|
|
|
const WCHAR *szDescription;
|
|
|
|
DWORD dwMajorVersion;
|
|
|
|
DWORD dwMinorVersion;
|
|
|
|
DWORD dwBuildNumber;
|
|
|
|
DWORD dwPlatformId;
|
|
|
|
const WCHAR *szCSDVersion;
|
|
|
|
WORD wServicePackMajor;
|
|
|
|
WORD wServicePackMinor;
|
|
|
|
const WCHAR *szProductType;
|
2020-04-16 16:06:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
static const struct win_version win_versions[] =
|
2005-08-17 13:37:34 +02:00
|
|
|
{
|
2022-01-25 18:02:25 +01:00
|
|
|
{ L"win10", L"Windows 10", 10, 0, 18362, VER_PLATFORM_WIN32_NT, L"", 0, 0, L"WinNT"},
|
|
|
|
{ L"win81", L"Windows 8.1", 6, 3, 9600, VER_PLATFORM_WIN32_NT, L"", 0, 0, L"WinNT"},
|
|
|
|
{ L"win8", L"Windows 8", 6, 2, 9200, VER_PLATFORM_WIN32_NT, L"", 0, 0, L"WinNT"},
|
|
|
|
{ L"win2008r2", L"Windows 2008 R2", 6, 1, 7601, VER_PLATFORM_WIN32_NT, L"Service Pack 1", 1, 0, L"ServerNT"},
|
|
|
|
{ L"win7", L"Windows 7", 6, 1, 7601, VER_PLATFORM_WIN32_NT, L"Service Pack 1", 1, 0, L"WinNT"},
|
|
|
|
{ L"win2008", L"Windows 2008", 6, 0, 6002, VER_PLATFORM_WIN32_NT, L"Service Pack 2", 2, 0, L"ServerNT"},
|
|
|
|
{ L"vista", L"Windows Vista", 6, 0, 6002, VER_PLATFORM_WIN32_NT, L"Service Pack 2", 2, 0, L"WinNT"},
|
|
|
|
{ L"win2003", L"Windows 2003", 5, 2, 3790, VER_PLATFORM_WIN32_NT, L"Service Pack 2", 2, 0, L"ServerNT"},
|
2013-10-01 16:34:20 +02:00
|
|
|
#ifdef _WIN64
|
2022-01-25 18:02:25 +01:00
|
|
|
{ L"winxp64", L"Windows XP", 5, 2, 3790, VER_PLATFORM_WIN32_NT, L"Service Pack 2", 2, 0, L"WinNT"},
|
2013-10-01 16:34:20 +02:00
|
|
|
#else
|
2022-01-25 18:02:25 +01:00
|
|
|
{ L"winxp", L"Windows XP", 5, 1, 2600, VER_PLATFORM_WIN32_NT, L"Service Pack 3", 3, 0, L"WinNT"},
|
|
|
|
{ L"win2k", L"Windows 2000", 5, 0, 2195, VER_PLATFORM_WIN32_NT, L"Service Pack 4", 4, 0, L"WinNT"},
|
|
|
|
{ L"winme", L"Windows ME", 4, 90, 3000, VER_PLATFORM_WIN32_WINDOWS, L" ", 0, 0, L""},
|
|
|
|
{ L"win98", L"Windows 98", 4, 10, 2222, VER_PLATFORM_WIN32_WINDOWS, L" A ", 0, 0, L""},
|
|
|
|
{ L"win95", L"Windows 95", 4, 0, 950, VER_PLATFORM_WIN32_WINDOWS, L"", 0, 0, L""},
|
|
|
|
{ L"nt40", L"Windows NT 4.0", 4, 0, 1381, VER_PLATFORM_WIN32_NT, L"Service Pack 6a", 6, 0, L"WinNT"},
|
|
|
|
{ L"nt351", L"Windows NT 3.51", 3, 51, 1057, VER_PLATFORM_WIN32_NT, L"Service Pack 5", 5, 0, L"WinNT"},
|
2021-09-07 17:14:22 +02:00
|
|
|
{ L"win31", L"Windows 3.1", 3, 10, 0, VER_PLATFORM_WIN32s, L"Win32s 1.3", 0, 0, L""},
|
|
|
|
{ L"win30", L"Windows 3.0", 3, 0, 0, VER_PLATFORM_WIN32s, L"Win32s 1.3", 0, 0, L""},
|
|
|
|
{ L"win20", L"Windows 2.0", 2, 0, 0, VER_PLATFORM_WIN32s, L"Win32s 1.3", 0, 0, L""}
|
2013-10-01 16:34:20 +02:00
|
|
|
#endif
|
2005-08-17 13:37:34 +02:00
|
|
|
};
|
|
|
|
|
2021-09-07 17:14:22 +02:00
|
|
|
#define DEFAULT_WIN_VERSION L"win7"
|
2020-09-01 00:11:39 +02:00
|
|
|
|
2021-09-07 17:14:22 +02:00
|
|
|
static const WCHAR szKey9x[] = L"Software\\Microsoft\\Windows\\CurrentVersion";
|
|
|
|
static const WCHAR szKeyNT[] = L"Software\\Microsoft\\Windows NT\\CurrentVersion";
|
|
|
|
static const WCHAR szKeyProdNT[] = L"System\\CurrentControlSet\\Control\\ProductOptions";
|
2006-11-30 15:16:41 +01:00
|
|
|
|
|
|
|
static int get_registry_version(void)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2008-05-02 19:08:09 +02:00
|
|
|
int i, best = -1, platform, major, minor = 0, build = 0;
|
2021-09-07 17:14:22 +02:00
|
|
|
WCHAR *p, *ver, *type = NULL;
|
2006-11-30 15:16:41 +01:00
|
|
|
|
2021-09-07 17:14:22 +02:00
|
|
|
if ((ver = get_reg_key( HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentVersion", NULL )))
|
2008-03-11 14:25:05 +01:00
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
WCHAR *build_str;
|
2008-03-11 14:25:05 +01:00
|
|
|
|
2006-11-30 15:16:41 +01:00
|
|
|
platform = VER_PLATFORM_WIN32_NT;
|
2008-03-11 14:25:05 +01:00
|
|
|
|
2021-09-07 17:14:22 +02:00
|
|
|
build_str = get_reg_key( HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentBuildNumber", NULL );
|
|
|
|
build = wcstol(build_str, NULL, 10);
|
2011-04-16 13:50:53 +02:00
|
|
|
|
2021-09-07 17:14:22 +02:00
|
|
|
type = get_reg_key( HKEY_LOCAL_MACHINE, szKeyProdNT, L"ProductType", NULL );
|
2008-03-11 14:25:05 +01:00
|
|
|
}
|
2021-09-07 17:14:22 +02:00
|
|
|
else if ((ver = get_reg_key( HKEY_LOCAL_MACHINE, szKey9x, L"VersionNumber", NULL )))
|
2006-11-30 15:16:41 +01:00
|
|
|
platform = VER_PLATFORM_WIN32_WINDOWS;
|
|
|
|
else
|
|
|
|
return -1;
|
|
|
|
|
2021-09-07 17:14:22 +02:00
|
|
|
if ((p = wcschr( ver, '.' )))
|
2006-11-30 15:16:41 +01:00
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
WCHAR *minor_str = p;
|
2008-03-11 14:25:05 +01:00
|
|
|
*minor_str++ = 0;
|
2021-09-07 17:14:22 +02:00
|
|
|
if ((p = wcschr( minor_str, '.' )))
|
2008-03-11 14:25:05 +01:00
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
WCHAR *build_str = p;
|
2008-03-11 14:25:05 +01:00
|
|
|
*build_str++ = 0;
|
2021-09-07 17:14:22 +02:00
|
|
|
build = wcstol(build_str, NULL, 10);
|
2008-03-11 14:25:05 +01:00
|
|
|
}
|
2021-09-07 17:14:22 +02:00
|
|
|
minor = wcstol(minor_str, NULL, 10);
|
2006-11-30 15:16:41 +01:00
|
|
|
}
|
2021-09-07 17:14:22 +02:00
|
|
|
major = wcstol(ver, NULL, 10);
|
2006-11-30 15:16:41 +01:00
|
|
|
|
2018-05-18 00:17:05 +02:00
|
|
|
for (i = 0; i < ARRAY_SIZE(win_versions); i++)
|
2006-11-30 15:16:41 +01:00
|
|
|
{
|
|
|
|
if (win_versions[i].dwPlatformId != platform) continue;
|
|
|
|
if (win_versions[i].dwMajorVersion != major) continue;
|
2021-09-07 17:14:22 +02:00
|
|
|
if (type && wcsicmp(win_versions[i].szProductType, type)) continue;
|
2006-11-30 15:16:41 +01:00
|
|
|
best = i;
|
2008-03-11 14:25:05 +01:00
|
|
|
if ((win_versions[i].dwMinorVersion == minor) &&
|
|
|
|
(win_versions[i].dwBuildNumber == build))
|
|
|
|
return i;
|
2006-11-30 15:16:41 +01:00
|
|
|
}
|
|
|
|
return best;
|
|
|
|
}
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2006-11-30 15:16:41 +01:00
|
|
|
static void update_comboboxes(HWND dialog)
|
|
|
|
{
|
|
|
|
int i, ver;
|
2021-09-07 17:14:22 +02:00
|
|
|
WCHAR *winver;
|
2006-11-30 15:16:41 +01:00
|
|
|
|
2005-10-17 10:55:45 +02:00
|
|
|
/* retrieve the registry values */
|
2021-09-07 17:14:22 +02:00
|
|
|
winver = get_reg_key(config_key, keypath(L""), L"Version", L"");
|
2006-11-30 15:16:41 +01:00
|
|
|
ver = get_registry_version();
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2007-06-11 20:20:39 +02:00
|
|
|
if (!winver || !winver[0])
|
2005-10-17 10:55:45 +02:00
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, winver);
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2005-10-17 10:55:45 +02:00
|
|
|
if (current_app) /* no explicit setting */
|
|
|
|
{
|
|
|
|
WINE_TRACE("setting winver combobox to default\n");
|
2012-01-20 12:42:33 +01:00
|
|
|
SendDlgItemMessageW(dialog, IDC_WINVER, CB_SETCURSEL, 0, 0);
|
2005-10-17 10:55:45 +02:00
|
|
|
return;
|
|
|
|
}
|
2021-09-07 17:14:22 +02:00
|
|
|
if (ver != -1) winver = strdupW( win_versions[ver].szVersion );
|
|
|
|
else winver = strdupW(DEFAULT_WIN_VERSION);
|
2005-10-17 10:55:45 +02:00
|
|
|
}
|
2021-09-07 17:14:22 +02:00
|
|
|
WINE_TRACE("winver is %s\n", debugstr_w(winver));
|
2005-10-17 10:55:45 +02:00
|
|
|
|
|
|
|
/* normalize the version strings */
|
2018-05-18 00:17:05 +02:00
|
|
|
for (i = 0; i < ARRAY_SIZE(win_versions); i++)
|
2005-10-17 10:55:45 +02:00
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
if (!wcsicmp(win_versions[i].szVersion, winver))
|
2005-10-17 10:55:45 +02:00
|
|
|
{
|
2012-01-20 12:42:33 +01:00
|
|
|
SendDlgItemMessageW(dialog, IDC_WINVER, CB_SETCURSEL,
|
2009-12-27 23:53:43 +01:00
|
|
|
i + (current_app?1:0), 0);
|
2021-09-07 17:14:22 +02:00
|
|
|
WINE_TRACE("match with %s\n", debugstr_w(win_versions[i].szVersion));
|
2005-10-17 10:55:45 +02:00
|
|
|
break;
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
2005-10-17 10:55:45 +02:00
|
|
|
}
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2005-10-17 10:55:45 +02:00
|
|
|
HeapFree(GetProcessHeap(), 0, winver);
|
2003-09-30 02:27:55 +02:00
|
|
|
}
|
|
|
|
|
2005-06-02 17:11:32 +02:00
|
|
|
static void
|
2004-09-28 05:16:43 +02:00
|
|
|
init_comboboxes (HWND dialog)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2005-10-17 10:55:45 +02:00
|
|
|
int i;
|
2004-09-28 05:16:43 +02:00
|
|
|
|
2012-01-20 12:42:33 +01:00
|
|
|
SendDlgItemMessageW(dialog, IDC_WINVER, CB_RESETCONTENT, 0, 0);
|
2005-05-07 20:06:35 +02:00
|
|
|
|
2005-10-17 10:55:45 +02:00
|
|
|
/* add the default entries (automatic) which correspond to no setting */
|
|
|
|
if (current_app)
|
2006-08-16 06:23:52 +02:00
|
|
|
{
|
|
|
|
WCHAR str[256];
|
2018-05-18 00:17:06 +02:00
|
|
|
LoadStringW(GetModuleHandleW(NULL), IDS_USE_GLOBAL_SETTINGS, str, ARRAY_SIZE(str));
|
2006-08-16 06:23:52 +02:00
|
|
|
SendDlgItemMessageW (dialog, IDC_WINVER, CB_ADDSTRING, 0, (LPARAM)str);
|
|
|
|
}
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2018-05-18 00:17:05 +02:00
|
|
|
for (i = 0; i < ARRAY_SIZE(win_versions); i++)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
SendDlgItemMessageW(dialog, IDC_WINVER, CB_ADDSTRING,
|
2005-08-17 13:37:34 +02:00
|
|
|
0, (LPARAM) win_versions[i].szDescription);
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
2003-09-30 02:27:55 +02:00
|
|
|
}
|
|
|
|
|
2006-10-06 22:41:22 +02:00
|
|
|
static void add_listview_item(HWND listview, WCHAR *text, void *association)
|
2004-09-28 05:16:43 +02:00
|
|
|
{
|
2006-08-16 06:23:52 +02:00
|
|
|
LVITEMW item;
|
2004-09-28 05:16:43 +02:00
|
|
|
|
|
|
|
item.mask = LVIF_TEXT | LVIF_PARAM;
|
2006-10-06 22:41:22 +02:00
|
|
|
item.pszText = text;
|
2006-08-16 06:23:52 +02:00
|
|
|
item.cchTextMax = lstrlenW(text);
|
2004-09-28 05:16:43 +02:00
|
|
|
item.lParam = (LPARAM) association;
|
2012-01-20 12:42:33 +01:00
|
|
|
item.iItem = SendMessageW( listview, LVM_GETITEMCOUNT, 0, 0 );
|
2006-10-05 11:02:05 +02:00
|
|
|
item.iSubItem = 0;
|
2004-09-28 05:16:43 +02:00
|
|
|
|
2012-01-20 12:42:33 +01:00
|
|
|
SendMessageW(listview, LVM_INSERTITEMW, 0, (LPARAM) &item);
|
2004-09-28 05:16:43 +02:00
|
|
|
}
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2004-09-28 05:55:16 +02:00
|
|
|
/* Called when the application is initialized (cannot reinit!) */
|
2004-09-28 05:16:43 +02:00
|
|
|
static void init_appsheet(HWND dialog)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2004-09-28 05:16:43 +02:00
|
|
|
HWND listview;
|
2012-01-20 12:42:33 +01:00
|
|
|
LVITEMW item;
|
2004-09-28 05:16:43 +02:00
|
|
|
HKEY key;
|
2004-02-07 02:01:34 +01:00
|
|
|
int i;
|
|
|
|
DWORD size;
|
2006-08-16 06:23:52 +02:00
|
|
|
WCHAR appname[1024];
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
WINE_TRACE("()\n");
|
2004-09-28 05:55:16 +02:00
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
listview = GetDlgItem(dialog, IDC_APP_LISTVIEW);
|
|
|
|
|
|
|
|
/* we use the lparam field of the item so we can alter the presentation later and not change code
|
|
|
|
* for instance, to use the tile view or to display the EXEs embedded 'display name' */
|
2018-05-18 00:17:06 +02:00
|
|
|
LoadStringW(GetModuleHandleW(NULL), IDS_DEFAULT_SETTINGS, appname, ARRAY_SIZE(appname));
|
2006-08-16 18:30:48 +02:00
|
|
|
add_listview_item(listview, appname, NULL);
|
2004-09-28 05:55:16 +02:00
|
|
|
|
|
|
|
/* because this list is only populated once, it's safe to bypass the settings list here */
|
2021-09-07 17:14:22 +02:00
|
|
|
if (RegOpenKeyW(config_key, L"AppDefaults", &key) == ERROR_SUCCESS)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2004-09-28 05:16:43 +02:00
|
|
|
i = 0;
|
2018-05-18 00:17:06 +02:00
|
|
|
size = ARRAY_SIZE(appname);
|
2006-08-16 06:23:52 +02:00
|
|
|
while (RegEnumKeyExW (key, i, appname, &size, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
|
2004-09-28 05:16:43 +02:00
|
|
|
{
|
2006-08-16 06:23:52 +02:00
|
|
|
add_listview_item(listview, appname, strdupW(appname));
|
2004-09-28 05:16:43 +02:00
|
|
|
|
|
|
|
i++;
|
2018-05-18 00:17:06 +02:00
|
|
|
size = ARRAY_SIZE(appname);
|
2004-09-28 05:16:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
RegCloseKey(key);
|
|
|
|
}
|
|
|
|
|
|
|
|
init_comboboxes(dialog);
|
|
|
|
|
|
|
|
/* Select the default settings listview item */
|
2012-01-20 12:42:33 +01:00
|
|
|
item.iItem = 0;
|
|
|
|
item.iSubItem = 0;
|
|
|
|
item.mask = LVIF_STATE;
|
|
|
|
item.state = LVIS_SELECTED | LVIS_FOCUSED;
|
|
|
|
item.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
|
2004-09-28 05:16:43 +02:00
|
|
|
|
2012-01-20 12:42:33 +01:00
|
|
|
SendMessageW(listview, LVM_SETITEMW, 0, (LPARAM) &item);
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
/* there has to be an easier way than this */
|
|
|
|
static int get_listview_selection(HWND listview)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2012-01-20 12:42:33 +01:00
|
|
|
int count = SendMessageW(listview, LVM_GETITEMCOUNT, 0, 0);
|
2004-09-28 05:16:43 +02:00
|
|
|
int i;
|
2012-01-20 12:42:33 +01:00
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
for (i = 0; i < count; i++)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2012-01-20 12:42:33 +01:00
|
|
|
if (SendMessageW( listview, LVM_GETITEMSTATE, i, LVIS_SELECTED )) return i;
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
2004-09-28 05:16:43 +02:00
|
|
|
|
|
|
|
return -1;
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
|
|
|
|
2004-09-28 05:55:16 +02:00
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
/* called when the user selects a different application */
|
|
|
|
static void on_selection_change(HWND dialog, HWND listview)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2012-01-20 12:42:33 +01:00
|
|
|
LVITEMW item;
|
2006-08-16 18:30:48 +02:00
|
|
|
WCHAR* oldapp = current_app;
|
2005-01-03 15:45:05 +01:00
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
WINE_TRACE("()\n");
|
2005-01-03 15:45:05 +01:00
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
item.iItem = get_listview_selection(listview);
|
2006-10-05 11:02:05 +02:00
|
|
|
item.iSubItem = 0;
|
2004-09-28 05:16:43 +02:00
|
|
|
item.mask = LVIF_PARAM;
|
2005-01-03 15:45:05 +01:00
|
|
|
|
|
|
|
WINE_TRACE("item.iItem=%d\n", item.iItem);
|
2004-09-28 05:16:43 +02:00
|
|
|
|
|
|
|
if (item.iItem == -1) return;
|
2012-01-20 12:42:33 +01:00
|
|
|
|
|
|
|
SendMessageW(listview, LVM_GETITEMW, 0, (LPARAM) &item);
|
2004-09-28 05:16:43 +02:00
|
|
|
|
2006-08-16 18:30:48 +02:00
|
|
|
current_app = (WCHAR*) item.lParam;
|
2004-09-28 05:16:43 +02:00
|
|
|
|
2004-11-23 14:50:23 +01:00
|
|
|
if (current_app)
|
2004-09-28 05:16:43 +02:00
|
|
|
{
|
2006-08-16 18:30:48 +02:00
|
|
|
WINE_TRACE("current_app is now %s\n", wine_dbgstr_w (current_app));
|
2004-09-28 05:16:43 +02:00
|
|
|
enable(IDC_APP_REMOVEAPP);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-11-23 14:50:23 +01:00
|
|
|
WINE_TRACE("current_app=NULL, editing global settings\n");
|
2004-09-28 05:16:43 +02:00
|
|
|
/* focus will never be on the button in this callback so it's safe */
|
|
|
|
disable(IDC_APP_REMOVEAPP);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* reset the combo boxes if we changed from/to global/app-specific */
|
|
|
|
|
2004-11-23 14:50:23 +01:00
|
|
|
if ((oldapp && !current_app) || (!oldapp && current_app))
|
2004-09-28 05:16:43 +02:00
|
|
|
init_comboboxes(dialog);
|
|
|
|
|
|
|
|
update_comboboxes(dialog);
|
2004-09-28 05:55:16 +02:00
|
|
|
|
|
|
|
set_window_title(dialog);
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
|
|
|
|
2006-08-16 06:23:52 +02:00
|
|
|
static BOOL list_contains_file(HWND listview, WCHAR *filename)
|
2005-05-04 11:47:46 +02:00
|
|
|
{
|
2006-08-16 06:23:52 +02:00
|
|
|
LVFINDINFOW find_info = { LVFI_STRING, filename, 0, {0, 0}, 0 };
|
2005-05-04 11:47:46 +02:00
|
|
|
int index;
|
|
|
|
|
2006-08-16 06:23:52 +02:00
|
|
|
index = ListView_FindItemW(listview, -1, &find_info);
|
2005-05-04 11:47:46 +02:00
|
|
|
|
|
|
|
return (index != -1);
|
|
|
|
}
|
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
static void on_add_app_click(HWND dialog)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2006-08-16 06:23:52 +02:00
|
|
|
WCHAR filetitle[MAX_PATH];
|
|
|
|
WCHAR file[MAX_PATH];
|
2011-01-13 21:15:08 +01:00
|
|
|
WCHAR programsFilter[100], filter[MAX_PATH];
|
2006-08-16 06:23:52 +02:00
|
|
|
WCHAR selectExecutableStr[100];
|
|
|
|
|
|
|
|
OPENFILENAMEW ofn = { sizeof(OPENFILENAMEW),
|
2015-04-06 07:44:48 +02:00
|
|
|
dialog, /*hInst*/0, 0, NULL, 0, 0, NULL,
|
2021-09-07 13:41:35 +02:00
|
|
|
0, NULL, 0, L"C:\\", 0,
|
2009-05-06 08:41:14 +02:00
|
|
|
OFN_SHOWHELP | OFN_HIDEREADONLY | OFN_ENABLESIZING,
|
|
|
|
0, 0, NULL, 0, NULL };
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2012-01-20 12:42:33 +01:00
|
|
|
LoadStringW (GetModuleHandleW(NULL), IDS_SELECT_EXECUTABLE, selectExecutableStr,
|
2018-05-18 00:17:06 +02:00
|
|
|
ARRAY_SIZE(selectExecutableStr));
|
2012-01-20 12:42:33 +01:00
|
|
|
LoadStringW (GetModuleHandleW(NULL), IDS_EXECUTABLE_FILTER, programsFilter,
|
2018-05-18 00:17:06 +02:00
|
|
|
ARRAY_SIZE(programsFilter));
|
2021-09-07 13:41:35 +02:00
|
|
|
swprintf( filter, MAX_PATH, L"%s%c*.exe;*.exe.so%c", programsFilter, 0, 0 );
|
2006-08-16 06:23:52 +02:00
|
|
|
|
|
|
|
ofn.lpstrTitle = selectExecutableStr;
|
2011-01-13 21:15:08 +01:00
|
|
|
ofn.lpstrFilter = filter;
|
2004-09-28 05:16:43 +02:00
|
|
|
ofn.lpstrFileTitle = filetitle;
|
2004-02-07 02:01:34 +01:00
|
|
|
ofn.lpstrFileTitle[0] = '\0';
|
2018-05-18 00:17:06 +02:00
|
|
|
ofn.nMaxFileTitle = ARRAY_SIZE(filetitle);
|
2004-09-28 05:16:43 +02:00
|
|
|
ofn.lpstrFile = file;
|
2004-02-07 02:01:34 +01:00
|
|
|
ofn.lpstrFile[0] = '\0';
|
2018-05-18 00:17:06 +02:00
|
|
|
ofn.nMaxFile = ARRAY_SIZE(file);
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2006-08-16 06:23:52 +02:00
|
|
|
if (GetOpenFileNameW (&ofn))
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2004-09-28 05:16:43 +02:00
|
|
|
HWND listview = GetDlgItem(dialog, IDC_APP_LISTVIEW);
|
2012-01-20 12:42:33 +01:00
|
|
|
int count = SendMessageW(listview, LVM_GETITEMCOUNT, 0, 0);
|
2006-08-16 06:23:52 +02:00
|
|
|
WCHAR* new_app;
|
2012-01-20 12:42:33 +01:00
|
|
|
LVITEMW item;
|
|
|
|
|
2006-08-16 18:30:48 +02:00
|
|
|
if (list_contains_file(listview, filetitle))
|
2005-05-04 11:47:46 +02:00
|
|
|
return;
|
2012-01-20 12:42:33 +01:00
|
|
|
|
2006-08-16 18:30:48 +02:00
|
|
|
new_app = strdupW(filetitle);
|
|
|
|
|
2006-08-16 06:23:52 +02:00
|
|
|
WINE_TRACE("adding %s\n", wine_dbgstr_w (new_app));
|
2012-01-20 12:42:33 +01:00
|
|
|
|
2006-08-16 18:30:48 +02:00
|
|
|
add_listview_item(listview, new_app, new_app);
|
2004-09-28 05:16:43 +02:00
|
|
|
|
2012-01-20 12:42:33 +01:00
|
|
|
item.mask = LVIF_STATE;
|
|
|
|
item.state = LVIS_SELECTED | LVIS_FOCUSED;
|
|
|
|
item.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
|
|
|
|
SendMessageW(listview, LVM_SETITEMSTATE, count, (LPARAM)&item );
|
2004-09-28 05:16:43 +02:00
|
|
|
|
|
|
|
SetFocus(listview);
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
2004-09-28 05:16:43 +02:00
|
|
|
else WINE_TRACE("user cancelled\n");
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
static void on_remove_app_click(HWND dialog)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2004-09-28 05:16:43 +02:00
|
|
|
HWND listview = GetDlgItem(dialog, IDC_APP_LISTVIEW);
|
|
|
|
int selection = get_listview_selection(listview);
|
2006-08-16 06:23:52 +02:00
|
|
|
LVITEMW item;
|
|
|
|
|
|
|
|
item.iItem = selection;
|
2006-10-05 11:02:05 +02:00
|
|
|
item.iSubItem = 0;
|
2006-08-16 20:46:13 +02:00
|
|
|
item.mask = LVIF_PARAM;
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2014-10-24 05:37:00 +02:00
|
|
|
WINE_TRACE("selection=%d\n", selection);
|
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
assert( selection != 0 ); /* user cannot click this button when "default settings" is selected */
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2021-09-07 17:14:22 +02:00
|
|
|
set_reg_key(config_key, keypath(L""), NULL, NULL); /* delete the section */
|
2012-01-20 12:42:33 +01:00
|
|
|
SendMessageW(listview, LVM_GETITEMW, 0, (LPARAM) &item);
|
2006-08-16 06:23:52 +02:00
|
|
|
HeapFree (GetProcessHeap(), 0, (void*)item.lParam);
|
2012-01-20 12:42:33 +01:00
|
|
|
SendMessageW(listview, LVM_DELETEITEM, selection, 0);
|
|
|
|
item.mask = LVIF_STATE;
|
|
|
|
item.state = LVIS_SELECTED | LVIS_FOCUSED;
|
|
|
|
item.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
|
2014-12-15 23:42:37 +01:00
|
|
|
SendMessageW(listview, LVM_SETITEMSTATE, 0, (LPARAM)&item);
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
SetFocus(listview);
|
2012-01-20 12:42:33 +01:00
|
|
|
SendMessageW(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0);
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
|
|
|
|
2020-04-16 16:06:27 +02:00
|
|
|
static void set_winver(const struct win_version *version)
|
2004-02-07 02:01:34 +01:00
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
static const WCHAR szKeyWindNT[] = L"System\\CurrentControlSet\\Control\\Windows";
|
|
|
|
static const WCHAR szKeyEnvNT[] = L"System\\CurrentControlSet\\Control\\Session Manager\\Environment";
|
|
|
|
WCHAR buffer[40];
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2020-04-16 16:06:27 +02:00
|
|
|
switch (version->dwPlatformId)
|
2004-09-28 05:16:43 +02:00
|
|
|
{
|
2005-08-17 13:37:34 +02:00
|
|
|
case VER_PLATFORM_WIN32_WINDOWS:
|
2021-09-07 17:14:22 +02:00
|
|
|
swprintf(buffer, ARRAY_SIZE(buffer), L"%d.%d.%d", version->dwMajorVersion,
|
2020-04-16 16:06:27 +02:00
|
|
|
version->dwMinorVersion, version->dwBuildNumber);
|
2021-09-07 17:14:22 +02:00
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, L"VersionNumber", buffer);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, L"SubVersionNumber", version->szCSDVersion);
|
|
|
|
swprintf(buffer, ARRAY_SIZE(buffer), L"Microsoft %s", version->szDescription);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, L"ProductName", buffer);
|
|
|
|
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CSDVersion", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentVersion", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentMajorVersionNumber", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentMinorVersionNumber", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentBuild", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentBuildNumber", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"ProductName", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyProdNT, L"ProductType", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyWindNT, L"CSDVersion", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyEnvNT, L"OS", NULL);
|
|
|
|
set_reg_key(config_key, keypath(L""), L"Version", NULL);
|
2005-08-17 13:37:34 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case VER_PLATFORM_WIN32_NT:
|
2021-09-07 17:14:22 +02:00
|
|
|
swprintf(buffer, ARRAY_SIZE(buffer), L"%d.%d", version->dwMajorVersion,
|
2020-04-16 16:06:27 +02:00
|
|
|
version->dwMinorVersion);
|
2021-09-07 17:14:22 +02:00
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentVersion", buffer);
|
|
|
|
set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentMajorVersionNumber", version->dwMajorVersion);
|
|
|
|
set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentMinorVersionNumber", version->dwMinorVersion);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CSDVersion", version->szCSDVersion);
|
|
|
|
swprintf(buffer, ARRAY_SIZE(buffer), L"%d", version->dwBuildNumber);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentBuild", buffer);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentBuildNumber", buffer);
|
|
|
|
swprintf(buffer, ARRAY_SIZE(buffer), L"Microsoft %s", version->szDescription);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"ProductName", buffer);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyProdNT, L"ProductType", version->szProductType);
|
|
|
|
set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyWindNT, L"CSDVersion",
|
2020-04-16 16:06:27 +02:00
|
|
|
MAKEWORD( version->wServicePackMinor,
|
|
|
|
version->wServicePackMajor ));
|
2021-09-07 17:14:22 +02:00
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyEnvNT, L"OS", L"Windows_NT");
|
2005-08-17 13:37:34 +02:00
|
|
|
|
2021-09-07 17:14:22 +02:00
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, L"VersionNumber", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, L"SubVersionNumber", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, L"ProductName", NULL);
|
|
|
|
set_reg_key(config_key, keypath(L""), L"Version", NULL);
|
2005-08-17 13:37:34 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case VER_PLATFORM_WIN32s:
|
2021-09-07 17:14:22 +02:00
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CSDVersion", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentVersion", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentBuild", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"CurrentBuildNumber", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, L"ProductName", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyProdNT, L"ProductType", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyWindNT, L"CSDVersion", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKeyEnvNT, L"OS", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, L"VersionNumber", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, L"SubVersionNumber", NULL);
|
|
|
|
set_reg_key(HKEY_LOCAL_MACHINE, szKey9x, L"ProductName", NULL);
|
|
|
|
set_reg_key(config_key, keypath(L""), L"Version", version->szVersion);
|
2005-08-17 13:37:34 +02:00
|
|
|
break;
|
2020-04-16 16:06:27 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-07 17:14:22 +02:00
|
|
|
BOOL set_winver_from_string(const WCHAR *version)
|
2020-04-16 16:06:27 +02:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2021-09-07 17:14:22 +02:00
|
|
|
WINE_TRACE("desired winver: %s\n", debugstr_w(version));
|
2020-04-16 16:06:27 +02:00
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(win_versions); i++)
|
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
if (!wcsicmp(win_versions[i].szVersion, version))
|
2020-04-16 16:06:27 +02:00
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
WINE_TRACE("match with %s\n", debugstr_w(win_versions[i].szVersion));
|
2020-04-16 16:06:27 +02:00
|
|
|
set_winver(&win_versions[i]);
|
|
|
|
apply();
|
|
|
|
return TRUE;
|
2005-08-17 13:37:34 +02:00
|
|
|
}
|
2004-09-28 05:16:43 +02:00
|
|
|
}
|
2004-09-28 05:55:16 +02:00
|
|
|
|
2020-04-16 16:06:27 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2020-04-16 16:06:47 +02:00
|
|
|
void print_windows_versions(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(win_versions); i++)
|
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
wprintf(L" %10s %s\n", win_versions[i].szVersion, win_versions[i].szDescription);
|
2020-04-16 16:06:47 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-01 00:11:39 +02:00
|
|
|
void print_current_winver(void)
|
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
WCHAR *winver = get_reg_key(config_key, keypath(L""), L"Version", L"");
|
2020-09-01 00:11:39 +02:00
|
|
|
|
|
|
|
if (!winver || !winver[0])
|
|
|
|
{
|
|
|
|
int ver = get_registry_version();
|
2021-09-07 17:14:22 +02:00
|
|
|
wprintf(L"%s\n", ver == -1 ? DEFAULT_WIN_VERSION : win_versions[ver].szVersion);
|
2020-09-01 00:11:39 +02:00
|
|
|
}
|
|
|
|
else
|
2021-09-07 17:14:22 +02:00
|
|
|
wprintf(L"%s\n", winver);
|
2020-09-01 00:11:39 +02:00
|
|
|
|
|
|
|
heap_free(winver);
|
|
|
|
}
|
|
|
|
|
2020-04-16 16:06:27 +02:00
|
|
|
static void on_winver_change(HWND dialog)
|
|
|
|
{
|
|
|
|
int selection = SendDlgItemMessageW(dialog, IDC_WINVER, CB_GETCURSEL, 0, 0);
|
|
|
|
|
|
|
|
if (current_app)
|
|
|
|
{
|
|
|
|
if (!selection)
|
|
|
|
{
|
|
|
|
WINE_TRACE("default selected so removing current setting\n");
|
2021-09-07 17:14:22 +02:00
|
|
|
set_reg_key(config_key, keypath(L""), L"Version", NULL);
|
2020-04-16 16:06:27 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-09-07 17:14:22 +02:00
|
|
|
WINE_TRACE("setting Version key to value %s\n", debugstr_w(win_versions[selection-1].szVersion));
|
|
|
|
set_reg_key(config_key, keypath(L""), L"Version", win_versions[selection-1].szVersion);
|
2020-04-16 16:06:27 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else /* global version only */
|
|
|
|
{
|
|
|
|
set_winver(&win_versions[selection]);
|
|
|
|
}
|
|
|
|
|
2004-09-28 05:55:16 +02:00
|
|
|
/* enable the apply button */
|
2012-01-20 12:42:33 +01:00
|
|
|
SendMessageW(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0);
|
2004-09-28 05:16:43 +02:00
|
|
|
}
|
2004-02-07 02:01:34 +01:00
|
|
|
|
2003-09-30 02:27:55 +02:00
|
|
|
INT_PTR CALLBACK
|
|
|
|
AppDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|
|
|
{
|
2004-02-07 02:01:34 +01:00
|
|
|
switch (uMsg)
|
|
|
|
{
|
2004-09-28 05:16:43 +02:00
|
|
|
case WM_INITDIALOG:
|
2004-09-28 05:55:16 +02:00
|
|
|
init_appsheet(hDlg);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_SHOWWINDOW:
|
|
|
|
set_window_title(hDlg);
|
|
|
|
break;
|
2004-09-28 05:16:43 +02:00
|
|
|
|
|
|
|
case WM_NOTIFY:
|
|
|
|
switch (((LPNMHDR)lParam)->code)
|
|
|
|
{
|
|
|
|
case LVN_ITEMCHANGED:
|
2004-09-28 05:55:16 +02:00
|
|
|
on_selection_change(hDlg, GetDlgItem(hDlg, IDC_APP_LISTVIEW));
|
|
|
|
break;
|
|
|
|
case PSN_APPLY:
|
|
|
|
apply();
|
2012-01-20 12:42:33 +01:00
|
|
|
SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
|
2004-09-28 05:55:16 +02:00
|
|
|
break;
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
2004-09-28 05:55:16 +02:00
|
|
|
|
2004-09-28 05:16:43 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_COMMAND:
|
2004-11-23 14:50:23 +01:00
|
|
|
switch(HIWORD(wParam))
|
|
|
|
{
|
2004-09-28 05:16:43 +02:00
|
|
|
case CBN_SELCHANGE:
|
2004-11-23 14:50:23 +01:00
|
|
|
switch(LOWORD(wParam))
|
|
|
|
{
|
2004-09-28 05:16:43 +02:00
|
|
|
case IDC_WINVER:
|
|
|
|
on_winver_change(hDlg);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case BN_CLICKED:
|
2004-11-23 14:50:23 +01:00
|
|
|
switch(LOWORD(wParam))
|
|
|
|
{
|
2004-09-28 05:16:43 +02:00
|
|
|
case IDC_APP_ADDAPP:
|
|
|
|
on_add_app_click(hDlg);
|
|
|
|
break;
|
|
|
|
case IDC_APP_REMOVEAPP:
|
|
|
|
on_remove_app_click(hDlg);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
2004-02-07 02:01:34 +01:00
|
|
|
}
|
2004-09-28 05:55:16 +02:00
|
|
|
|
2004-02-07 02:01:34 +01:00
|
|
|
break;
|
|
|
|
}
|
2004-09-28 05:16:43 +02:00
|
|
|
|
2004-02-07 02:01:34 +01:00
|
|
|
return 0;
|
2003-09-30 02:27:55 +02:00
|
|
|
}
|