From 3b3096b10c899122eaa2091521f0b25b417c4d88 Mon Sep 17 00:00:00 2001 From: maxim Date: Tue, 11 Apr 2017 21:46:37 +0000 Subject: [PATCH] Merged revision(s) 54600 #3ded31c99a from trunk: LCL-Win32: Fix range error in ComboBoxWindowProc. Use SetWindowLong from LCLIntf. Issue #31635, patch from Petr-K. ........ git-svn-id: branches/fixes_1_8@54610 - --- lcl/interfaces/win32/win32wsstdctrls.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/win32/win32wsstdctrls.pp b/lcl/interfaces/win32/win32wsstdctrls.pp index 1fe3b7e650..03157f765e 100644 --- a/lcl/interfaces/win32/win32wsstdctrls.pp +++ b/lcl/interfaces/win32/win32wsstdctrls.pp @@ -31,7 +31,7 @@ uses Classes, SysUtils, CommCtrl, StdCtrls, Controls, Graphics, Forms, Themes, //////////////////////////////////////////////////// - WSControls, WSStdCtrls, WSLCLClasses, WSProc, Windows, LCLType, + WSControls, WSStdCtrls, WSLCLClasses, WSProc, Windows, LCLIntf, LCLType, LazUTF8, LazUtf8Classes, InterfaceBase, LMessages, LCLMessageGlue, TextStrings, Win32Int, Win32Proc, Win32WSControls, Win32Extra, Win32Themes; @@ -803,7 +803,7 @@ begin Handle := ACustomListBox.Handle; // The check for GetProp is required because of some division error which happens // if call LB_GETITEMRECT on window initialization - Result := (GetProp(Handle, 'WinControl') <> 0) and (Windows.SendMessage(Handle, LB_GETITEMRECT, Index, LPARAM(@ARect)) <> LB_ERR); + Result := Assigned(GetProp(Handle, 'WinControl')) and (Windows.SendMessage(Handle, LB_GETITEMRECT, Index, LPARAM(@ARect)) <> LB_ERR); end; class function TWin32WSCustomListBox.GetScrollWidth(const ACustomListBox: TCustomListBox): Integer;