From 7ad89954caa49e53b249c20ae38af0216db848ed Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 23 Aug 2012 10:28:21 +0100 Subject: gdi: The IDropSource signature has changed in FPC > 2.6.0 Once the next stable FPC is released, then we can remove this again. --- src/corelib/gdi/fpg_oledragdrop.pas | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/corelib/gdi/fpg_oledragdrop.pas b/src/corelib/gdi/fpg_oledragdrop.pas index 66048c96..36eed0a5 100644 --- a/src/corelib/gdi/fpg_oledragdrop.pas +++ b/src/corelib/gdi/fpg_oledragdrop.pas @@ -57,8 +57,13 @@ type TfpgOLEDropSource = class(TInterfacedObject, IDropSource) private { IDropSource } + {$IF FPC_FULLVERSION>=20601} + function QueryContinueDrag(fEscapePressed: BOOL; grfKeyState: DWORD):HResult; StdCall; + function GiveFeedback(dwEffect: DWORD): HResult; StdCall; + {$ELSE} function QueryContinueDrag(fEscapePressed: BOOL; grfKeyState: Longint): HResult; stdcall; - function GiveFeedback(dwEffect: Longint): HResult; stdcall; + function GiveFeedback(dwEffect: longint): HResult; stdcall; + {$ENDIF} end; @@ -457,12 +462,20 @@ end; { TfpgOLEDropSource } -function TfpgOLEDropSource.GiveFeedback(dwEffect: Integer): HResult; +{$IF FPC_FULLVERSION>=20601} +function TfpgOLEDropSource.GiveFeedback(dwEffect: DWORD): HResult; +{$ELSE} +function TfpgOLEDropSource.GiveFeedback(dwEffect: longint): HResult; +{$ENDIF} begin Result := DRAGDROP_S_USEDEFAULTCURSORS; end; -function TfpgOLEDropSource.QueryContinueDrag(fEscapePressed: BOOL; grfKeyState: Integer): HResult; +{$IF FPC_FULLVERSION>=20601} +function TfpgOLEDropSource.QueryContinueDrag(fEscapePressed: BOOL; grfKeyState: DWORD):HResult; +{$ELSE} +function TfpgOLEDropSource.QueryContinueDrag(fEscapePressed: BOOL; grfKeyState: LongInt): HResult; +{$ENDIF} begin if FEscapePressed then Result := DRAGDROP_S_CANCEL -- cgit v1.2.3-70-g09d2