Owen Rudge : appwiz.cpl: Check to see if buttons should be enabled.
Alexandre Julliard
julliard at winehq.org
Fri Jul 25 08:13:48 CDT 2008
Module: wine
Branch: master
Commit: d8d725f73f5594cc95942ed48b2357dd6bf814ac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d8d725f73f5594cc95942ed48b2357dd6bf814ac
Author: Owen Rudge <owen at owenrudge.net>
Date: Mon Jul 21 19:42:21 2008 +0100
appwiz.cpl: Check to see if buttons should be enabled.
---
dlls/appwiz.cpl/appwiz.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c
index 6f3a083..4bf86a9 100644
--- a/dlls/appwiz.cpl/appwiz.c
+++ b/dlls/appwiz.cpl/appwiz.c
@@ -68,6 +68,20 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
return TRUE;
}
+/******************************************************************************
+ * Name : UpdateButtons
+ * Description: Enables/disables the Add/Remove button depending on current
+ * selection in list box.
+ * Parameters : hWnd - Handle of the dialog box
+ */
+static void UpdateButtons(HWND hWnd)
+{
+ BOOL sel = ListView_GetSelectedCount(GetDlgItem(hWnd, IDL_PROGRAMS)) != 0;
+
+ EnableWindow(GetDlgItem(hWnd, IDC_ADDREMOVE), sel);
+ EnableWindow(GetDlgItem(hWnd, IDC_SUPPORT_INFO), sel);
+}
+
/* Definition of column headers for AddListViewColumns function */
typedef struct AppWizColumn {
int width;
@@ -166,6 +180,8 @@ static HIMAGELIST ResetApplicationList(BOOL bFirstRun, HWND hWnd, HIMAGELIST hIm
/* now create the image list and add the applications to the listview */
hImageList = AddListViewImageList(hWndListView);
+ UpdateButtons(hWnd);
+
return(hImageList);
}
More information about the wine-cvs
mailing list