winecfg: Enable add button when choosing lib from combobox (Libraries tabsheet).

This commit is contained in:
Andre Wisplinghoff 2008-01-31 18:08:32 +01:00 committed by Alexandre Julliard
parent c9f5f2c6a2
commit 9bf3355a11

View File

@ -408,10 +408,14 @@ static void init_libsheet(HWND dialog)
static void on_add_combo_change(HWND dialog)
{
char buffer[1024];
int sel, len;
SendDlgItemMessage(dialog, IDC_DLLCOMBO, WM_GETTEXT, sizeof(buffer), (LPARAM) buffer);
/* if lib was chosen from combobox, we reveive an empty buffer, check manually */
sel=SendDlgItemMessage(dialog, IDC_DLLCOMBO, CB_GETCURSEL, 0, 0);
len=SendDlgItemMessage(dialog, IDC_DLLCOMBO, CB_GETLBTEXTLEN, sel, 0);
if (strlen(buffer))
if (strlen(buffer)>0 || len>0)
enable(IDC_DLLS_ADDDLL)
else
disable(IDC_DLLS_ADDDLL);