mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-29 09:22:44 +02:00
win32: fix TWin32WSCustomCalendar.HitTest for systems < vista
git-svn-id: trunk@22441 -
This commit is contained in:
parent
cd5f7242c6
commit
ef831d1924
@ -35,7 +35,8 @@ uses
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
CommCtrl, SysUtils, Controls, LCLType, Calendar,
|
CommCtrl, SysUtils, Controls, LCLType, Calendar,
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
WSCalendar, WSLCLClasses, WSProc, Windows, Win32WSControls;
|
WSCalendar, WSLCLClasses, WSProc, Windows, Win32WSControls,
|
||||||
|
win32proc;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -127,7 +128,10 @@ begin
|
|||||||
if not WSCheckHandleAllocated(ACalendar, 'TWin32WSCustomCalendar.HitTest') then
|
if not WSCheckHandleAllocated(ACalendar, 'TWin32WSCustomCalendar.HitTest') then
|
||||||
Exit;
|
Exit;
|
||||||
FillChar(HitTestInfo, SizeOf(HitTestInfo), 0);
|
FillChar(HitTestInfo, SizeOf(HitTestInfo), 0);
|
||||||
HitTestInfo.cbSize := SizeOf(HitTestInfo);
|
if WindowsVersion >= wvVista then
|
||||||
|
HitTestInfo.cbSize := SizeOf(HitTestInfo)
|
||||||
|
else
|
||||||
|
HitTestInfo.cbSize := 32;
|
||||||
HitTestInfo.pt := APoint;
|
HitTestInfo.pt := APoint;
|
||||||
HitPart := SendMessage(ACalendar.Handle, MCM_HITTEST, 0, LPARAM(@HitTestInfo));
|
HitPart := SendMessage(ACalendar.Handle, MCM_HITTEST, 0, LPARAM(@HitTestInfo));
|
||||||
case HitPart of
|
case HitPart of
|
||||||
|
Loading…
Reference in New Issue
Block a user