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 -
This commit is contained in:
maxim 2017-04-11 21:46:37 +00:00
parent 13dff9bf74
commit 3b3096b10c

View File

@ -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;