From 71bf9bda93a957d76f473c0a8f0f0d73b667ecfa Mon Sep 17 00:00:00 2001 From: zeljko Date: Sat, 2 Oct 2010 16:41:32 +0000 Subject: [PATCH] Qt: fixed result of TQtWidgetSet.EnableWindow() git-svn-id: trunk@27548 - --- lcl/interfaces/qt/qtwinapi.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lcl/interfaces/qt/qtwinapi.inc b/lcl/interfaces/qt/qtwinapi.inc index 17042a6913..4085a3a2a9 100644 --- a/lcl/interfaces/qt/qtwinapi.inc +++ b/lcl/interfaces/qt/qtwinapi.inc @@ -1350,9 +1350,12 @@ begin {$ifdef VerboseQtWinAPI} WriteLn('[WinAPI EnableWindow] '); {$endif} - - Result := TQtWidget(hwnd).getEnabled; - TQtWidget(hWnd).setEnabled(bEnable); + Result := False; + if HWND <> 0 then + begin + Result := not TQtWidget(hwnd).getEnabled; + TQtWidget(hWnd).setEnabled(bEnable); + end; end; {------------------------------------------------------------------------------