Mike McCormack : msi: Make radio buttons grey out correctly when
disabled.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jan 6 06:16:59 CST 2006
Module: wine
Branch: refs/heads/master
Commit: abbe4b6dd06054f0506009a2bc9ae6abf44b58d0
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=abbe4b6dd06054f0506009a2bc9ae6abf44b58d0
Author: Mike McCormack <mike at codeweavers.com>
Date: Fri Jan 6 12:19:33 2006 +0100
msi: Make radio buttons grey out correctly when disabled.
---
dlls/msi/dialog.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 1384e22..bb64fdc 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -722,7 +722,8 @@ MSIScrollText_WndProc(HWND hWnd, UINT ms
msi_free( info );
RemovePropW( hWnd, szButtonData );
break;
- case WM_VSCROLL:
+ case WM_PAINT:
+ /* native MSI sets a wait cursor here */
msi_dialog_button_handler( info->dialog, info->control, BN_CLICKED );
break;
}
@@ -2007,16 +2008,29 @@ static LRESULT WINAPI MSIDialog_WndProc(
return DefWindowProcW(hwnd, msg, wParam, lParam);
}
+static BOOL CALLBACK msi_radioground_child_enum( HWND hWnd, LPARAM lParam )
+{
+ EnableWindow( hWnd, lParam );
+ return TRUE;
+}
+
static LRESULT WINAPI MSIRadioGroup_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
WNDPROC oldproc = (WNDPROC) GetPropW(hWnd, szButtonData);
+ LRESULT r;
TRACE("hWnd %p msg %04x wParam 0x%08x lParam 0x%08lx\n", hWnd, msg, wParam, lParam);
if (msg == WM_COMMAND) /* Forward notifications to dialog */
SendMessageW(GetParent(hWnd), msg, wParam, lParam);
- return CallWindowProcW(oldproc, hWnd, msg, wParam, lParam);
+ r = CallWindowProcW(oldproc, hWnd, msg, wParam, lParam);
+
+ /* make sure the radio buttons show as disabled if the parent is disabled */
+ if (msg == WM_ENABLE)
+ EnumChildWindows( hWnd, msi_radioground_child_enum, wParam );
+
+ return r;
}
static LRESULT WINAPI MSIHiddenWindowProc( HWND hwnd, UINT msg,
More information about the wine-cvs
mailing list