diff --git a/components/tvplanit/source/vpcalendar.pas b/components/tvplanit/source/vpcalendar.pas index 516761076..cccb33973 100644 --- a/components/tvplanit/source/vpcalendar.pas +++ b/components/tvplanit/source/vpcalendar.pas @@ -34,7 +34,7 @@ unit VpCalendar; interface uses - {$IFDEF LCL} + {$IFDEF LCL} windows, LMessages, LCLProc, LCLType, LCLIntf, LazUTF8, {$ELSE} Windows, @@ -217,7 +217,7 @@ type procedure DoOnChange(Value: TDateTime); dynamic; function DoOnGetDateEnabled(ADate: TDateTime): Boolean; dynamic; {$IFDEF LCL} - // .... to be done in DoMouseWheel + function DoMouseWheel(Shift: TShiftState; Delta: Integer; MousePos: TPoint): Boolean; override; {$ELSE} procedure DoOnMouseWheel(Shift: TShiftState; Delta, XPos, YPos: SmallInt); override; {$ENDIF} @@ -922,13 +922,22 @@ end; {=====} {$IFDEF LCL} - // to be done in DoMouseWheel +function TVpCustomCalendar.DoMouseWheel(Shift: TShiftState; + Delta: Integer; MousePos: TPoint): Boolean; {$ELSE} -procedure TVpCustomCalendar.DoOnMouseWheel(Shift: TShiftState; Delta, XPos, YPos: SmallInt); +procedure TVpCustomCalendar.DoMouseWheel(Shift: TShiftState; + Delta, XPos, YPos: SmallInt); +{$ENDIF} +const + WHEEL_DELTA = 120; // in unit Windows. var - Key: Word; + key: Word; begin + {$IFDEF LCL} + Result := inherited DoMouseWheel(Shift, Delta, MousePos); + {$ELSE} inherited DoOnMouseWheel(Shift, Delta, XPos, YPos); + {$ENDIF} if Abs(Delta) = WHEEL_DELTA then begin {inc/dec month} if Delta < 0 then @@ -952,7 +961,6 @@ begin KeyDown(Key, []); end; end; -{$ENDIF} {=====} function TVpCustomCalendar.IsReadOnly: Boolean; diff --git a/components/tvplanit/source/vpconst.pas b/components/tvplanit/source/vpconst.pas index a8404e532..1cca4364d 100644 --- a/components/tvplanit/source/vpconst.pas +++ b/components/tvplanit/source/vpconst.pas @@ -40,7 +40,7 @@ interface uses {$IFDEF LCL} - Controls,LCLType,LCLProc, + Controls, LCLType, LCLProc, {$ELSE} Windows, {$ENDIF} diff --git a/components/tvplanit/source/vpdayview.pas b/components/tvplanit/source/vpdayview.pas index fe2984825..5305d15e8 100644 --- a/components/tvplanit/source/vpdayview.pas +++ b/components/tvplanit/source/vpdayview.pas @@ -2025,12 +2025,6 @@ end; {=====} {$IFDEF LCL} -{ -procedure TVpDayView.WMMouseWheel(var Message: TLMMouseEvent); -begin - inherited; -end; - } function TVpDayView.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; begin