From 32c8b1cb1cf4c0212d24cde7b1c9cdacd072e37e Mon Sep 17 00:00:00 2001 From: macpgmr Date: Mon, 28 Apr 2014 20:45:29 +0000 Subject: [PATCH] Patches for 64-bit support. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2975 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/orpheus/alltests-linux.sh | 12 ++++++ components/orpheus/mymisc.pas | 43 +++++++++++++------ components/orpheus/o32flxed.pas | 8 ++-- components/orpheus/o32tcflx.pas | 3 +- components/orpheus/o32vlop1.pas | 4 +- components/orpheus/orpheus.lpk | 2 +- components/orpheus/ovcbase.pas | 12 +++--- components/orpheus/ovccmbx.pas | 9 ++-- components/orpheus/ovcef.pas | 17 ++++---- components/orpheus/ovcmisc.pas | 11 ++--- components/orpheus/ovcsf.pas | 8 ++-- components/orpheus/ovctable.pas | 5 ++- components/orpheus/ovctcbef.pas | 3 +- components/orpheus/ovctcbmp.pas | 5 ++- components/orpheus/ovctccbx.pas | 3 +- components/orpheus/ovctcedt.pas | 3 +- components/orpheus/ovctcell.pas | 9 ++-- components/orpheus/ovctcgly.pas | 3 +- components/orpheus/ovctcmmn.pas | 3 +- components/orpheus/ovcvlb.pas | 6 +-- .../orpheus/tests/TestCalendar/unit1.pas | 6 +-- .../orpheus/tests/TestFlexEdit/unit1.pas | 7 +-- components/orpheus/tests/TestLabel/unit1.pas | 6 +-- components/orpheus/tests/TestRLbl/unit1.pas | 6 +-- .../orpheus/tests/TestSimpField/unit1.pas | 6 +-- .../orpheus/tests/TestSpinner/unit1.pas | 7 +-- components/orpheus/tests/TestTable/unit1.pas | 7 +-- .../orpheus/tests/TestTblEdits/unit1.pas | 6 +-- components/orpheus/tests/TestURL/unit1.pas | 6 +-- components/orpheus/tests/TestVLB/unit1.pas | 6 +-- 30 files changed, 125 insertions(+), 107 deletions(-) create mode 100755 components/orpheus/alltests-linux.sh diff --git a/components/orpheus/alltests-linux.sh b/components/orpheus/alltests-linux.sh new file mode 100755 index 000000000..fc6dc3454 --- /dev/null +++ b/components/orpheus/alltests-linux.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +lazbuild -d tests/TestFlexEdit/project1.lpi +lazbuild -d tests/TestLabel/project1.lpi +lazbuild -d tests/TestRLbl/project1.lpi +lazbuild -d tests/TestSimpField/project1.lpi +lazbuild -d tests/TestSpinner/project1.lpi +lazbuild -d tests/TestTable/project1.lpi +lazbuild -d tests/TestTblEdits/project1.lpi +lazbuild -d tests/TestURL/project1.lpi +lazbuild -d tests/TestVLB/project1.lpi +lazbuild -d tests/TestCalendar/project1.lpi diff --git a/components/orpheus/mymisc.pas b/components/orpheus/mymisc.pas index ef1e67eac..da5372a67 100644 --- a/components/orpheus/mymisc.pas +++ b/components/orpheus/mymisc.pas @@ -47,11 +47,12 @@ unit MyMisc; interface -uses +uses + SysUtils, {$IFDEF MSWINDOWS} Windows, {$ELSE} Types, {$ENDIF} LclIntf, LMessages, LclType, InterfaceBase, {$IFDEF LINUX} FileUtil, {$ENDIF} - GraphType, Graphics, Controls, SysUtils; + GraphType, Graphics, Controls; type TButtonStyle = (bsAutoDetect, bsWin31, bsNew); @@ -72,10 +73,16 @@ type TWMSysKeyDown = TLMSysKeyDown; TWMMouseActivate = packed record Msg: Cardinal; +{$ifdef cpu64} //64 + UnusedMsg: Cardinal; +{$endif} TopLevel: HWND; HitTestCode: Word; MouseMsg: Word; - Result: Longint; +{$ifdef cpu64} //64 + Unused: Longint; +{$endif} + Result: LRESULT; //64 end; TWMMouseMove = TLMMouseMove; TWMPaste = TLMNoParams; @@ -84,22 +91,29 @@ type TWMGetText = TLMGetText; TWMGetTextLength = TLMGetTextLength; TWMKillFocus = TLMKillFocus; - TWMSetCursor = packed record - Msg: Cardinal; - CursorWnd: HWND; - HitTest: Word; - MouseMsg: Word; - Result: Longint; - end; + TWMSetCursor = TLMSetCursor; //64 +// TWMSetCursor = packed record +// Msg: Cardinal; +// CursorWnd: HWND; +// HitTest: Word; +// MouseMsg: Word; +// Result: Longint; +// end; TWMSetFocus = TLMSetFocus; TWMGetDlgCode = TLMNoParams; TWMSize = TLMSize; TWMSetFont = packed record Msg: Cardinal; +{$ifdef cpu64} //64 + UnusedMsg: Cardinal; +{$endif} Font: HFONT; Redraw: WordBool; Unused: Word; - Result: Longint; +{$ifdef cpu64} //64 + Unused2: Longint; +{$endif} + Result: LRESULT; //64 end; TWMCommand = TLMCommand; TWMDrawItem = TLMDrawItems; @@ -128,9 +142,12 @@ type TWMPaint = TLMPaint; TWMNCPaint = packed record Msg: Cardinal; +{$ifdef cpu64} //64 + UnusedMsg: Cardinal; +{$endif} RGN: HRGN; - Unused: Longint; - Result: Longint; + Unused: LPARAM; //64 + Result: LRESULT; //64 end; TWMHScroll = TLMHScroll; TWMVScroll = TLMVScroll; diff --git a/components/orpheus/o32flxed.pas b/components/orpheus/o32flxed.pas index 533f25a6b..c7beaefaf 100644 --- a/components/orpheus/o32flxed.pas +++ b/components/orpheus/o32flxed.pas @@ -487,7 +487,7 @@ var begin Word((@Text)^) := SizeOf(Text); SetString(Result, Text, SendMessage(FlexEdit.Handle, EM_GETLINE, Index, - Longint(@Text))); + LPARAM(@Text))); //64 end; {=====} @@ -500,7 +500,7 @@ begin begin SendMessage(FlexEdit.Handle, EM_SETSEL, SelStart, SelStart + SendMessage(FlexEdit.Handle, EM_LINELENGTH, SelStart, 0)); - SendMessage(FlexEdit.Handle, EM_REPLACESEL, 0, Longint(PChar(S))); + SendMessage(FlexEdit.Handle, EM_REPLACESEL, 0, LPARAM(PChar(S))); //64 end; end; {=====} @@ -525,7 +525,7 @@ begin Line := #13#10 + s; end; SendMessage(FlexEdit.Handle, EM_SETSEL, SelStart, SelStart); - SendMessage(FlexEdit.Handle, EM_REPLACESEL, 0, Longint(PChar(Line))); + SendMessage(FlexEdit.Handle, EM_REPLACESEL, 0, LPARAM(PChar(Line))); //64 end; end; {=====} @@ -543,7 +543,7 @@ begin if SelEnd < 0 then SelEnd := SelStart + SendMessage(FlexEdit.Handle, EM_LINELENGTH, SelStart, 0); SendMessage(FlexEdit.Handle, EM_SETSEL, SelStart, SelEnd); - SendMessage(FlexEdit.Handle, EM_REPLACESEL, 0, Longint(Empty)); + SendMessage(FlexEdit.Handle, EM_REPLACESEL, 0, LPARAM(Empty)); //64 end; end; {=====} diff --git a/components/orpheus/o32tcflx.pas b/components/orpheus/o32tcflx.pas index 3aea97ff3..cb5c788f2 100644 --- a/components/orpheus/o32tcflx.pas +++ b/components/orpheus/o32tcflx.pas @@ -41,8 +41,9 @@ unit o32tcflx; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, Types, LclType, MyMisc, {$ENDIF} - SysUtils, Graphics, Classes, Controls, Forms, StdCtrls, + Graphics, Controls, Forms, StdCtrls, Menus, OvcTCmmn, OvcTCell, OvcTCStr, O32FlxEd, O32bordr, OvcEf, OvcCmd, O32VlOp1, O32Vldtr; diff --git a/components/orpheus/o32vlop1.pas b/components/orpheus/o32vlop1.pas index 2a6b28c99..006e13134 100644 --- a/components/orpheus/o32vlop1.pas +++ b/components/orpheus/o32vlop1.pas @@ -227,7 +227,7 @@ begin if not Assigned(Pointer(GetWindowLong(FHookedControl.Handle, GWL_USERDATA))) then FreeMem(MethodPtr); //SetWindowLong not implemented for widgetset {$ENDIF} - SetWindowLong(FHookedControl.Handle, GWL_WNDPROC, LongInt(NewWndProc)); + SetWindowLong(FHookedControl.Handle, GWL_WNDPROC, LPARAM(NewWndProc)); //64 end; end; end; @@ -248,7 +248,7 @@ begin if Assigned(MethodPtr) then FreeMem(MethodPtr); {$ENDIF} - SetWindowLong(FHookedControl.Handle, GWL_WNDPROC, LongInt(PrevWndProc)); + SetWindowLong(FHookedControl.Handle, GWL_WNDPROC, LPARAM(PrevWndProc)); //64 end; end; PrevWndProc := nil; diff --git a/components/orpheus/orpheus.lpk b/components/orpheus/orpheus.lpk index 4c7cf5c02..d6843db4b 100644 --- a/components/orpheus/orpheus.lpk +++ b/components/orpheus/orpheus.lpk @@ -31,7 +31,7 @@ "/> - + diff --git a/components/orpheus/ovcbase.pas b/components/orpheus/ovcbase.pas index 9d4c0b0a7..a79b37935 100644 --- a/components/orpheus/ovcbase.pas +++ b/components/orpheus/ovcbase.pas @@ -952,7 +952,7 @@ begin if Assigned(PF) then begin for I := 0 to Pred(PF.ComponentCount) do begin if PF.Components[I] = FControl then begin - SendMessage(FControl.Handle, OM_ASSIGNLABEL, 0, LongInt(Self)); + SendMessage(FControl.Handle, OM_ASSIGNLABEL, 0, LPARAM(Self)); //64 PostMessage(FControl.Handle, OM_RECORDLABELPOSITION, 0, 0); Break; end; @@ -1503,7 +1503,7 @@ end; procedure TOvcController.DelayNotify(Sender : TObject; NotifyCode : Word); begin if Assigned(FOnDelayNotify) then - PostMessage(Handle, OM_DELAYNOTIFY, NotifyCode, LongInt(Sender)); + PostMessage(Handle, OM_DELAYNOTIFY, NotifyCode, LPARAM(Sender)); //64 end; destructor TOvcController.Destroy; @@ -1555,7 +1555,7 @@ begin else H := 0; - PostMessage(Handle, OM_POSTEDIT, H, LongInt(Sender)); + PostMessage(Handle, OM_POSTEDIT, H, LPARAM(Sender)); //64 end; procedure TOvcController.DoOnPreEdit(Sender : TObject; LosingControl : TWinControl); @@ -1567,7 +1567,7 @@ begin else H := 0; - PostMessage(Handle, OM_PREEDIT, H, LongInt(Sender)); + PostMessage(Handle, OM_PREEDIT, H, LPARAM(Sender)); //64 end; procedure TOvcController.DoOnTimerTrigger(Sender : TObject; Handle : Integer; @@ -1682,7 +1682,7 @@ var {ask the controller to give the focus back to this field} if ChangeFocus and not ErrorPending then begin - PostMessage(Handle, OM_SETFOCUS, 0, LongInt(EF)); + PostMessage(Handle, OM_SETFOCUS, 0, LPARAM(EF)); //64 ErrorPending := True; end; @@ -1743,7 +1743,7 @@ begin {ask the controller to give the focus back to this field} if not ErrorPending then begin - PostMessage(Handle, OM_SETFOCUS, 0, LongInt(EF)); + PostMessage(Handle, OM_SETFOCUS, 0, LPARAM(EF)); //64 ErrorPending := True; end; diff --git a/components/orpheus/ovccmbx.pas b/components/orpheus/ovccmbx.pas index 7e693ebfc..95bbb089f 100644 --- a/components/orpheus/ovccmbx.pas +++ b/components/orpheus/ovccmbx.pas @@ -40,8 +40,9 @@ unit ovccmbx; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, LResources, MyMisc, {$ENDIF} - SysUtils, Classes, Graphics, Controls, Forms, StdCtrls, + Graphics, Controls, Forms, StdCtrls, Buttons, OvcBase, OvcConst, OvcData, OvcMisc, OvcBordr {$IFNDEF LCL}, OvcTimer {$ENDIF}; type @@ -715,7 +716,7 @@ begin ItemIndex := SendMessage(Handle, CB_FINDSTRINGEXACT, FMRUList.Items.Count - 1, - LongInt(SrchText)); + LPARAM(SrchText)); //64 finally FreeMem(SrchText, L); end; @@ -1001,7 +1002,7 @@ begin {this will search for the first matching item} Index := SendMessage(Handle, CB_FINDSTRING, FMRUList.Items.Count - 1, - LongInt(SrchText)); + LPARAM(SrchText)); //64 finally FreeMem(SrchText, length(Text) + 1); end; @@ -1374,7 +1375,7 @@ begin ItemIndex := SendMessage(Handle, CB_FINDSTRINGEXACT, 0, - LongInt(SrchText)); + LPARAM(SrchText)); //64 finally FreeMem(SrchText, L); end; diff --git a/components/orpheus/ovcef.pas b/components/orpheus/ovcef.pas index 2c4e470a5..b19800aad 100644 --- a/components/orpheus/ovcef.pas +++ b/components/orpheus/ovcef.pas @@ -41,9 +41,10 @@ unit ovcef; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, Types, LclType, MyMisc, {$ENDIF} - Classes, ClipBrd, Controls, Forms, Graphics, Menus, - SysUtils, {$IFDEF VERSION6} Variants, {$ENDIF} + ClipBrd, Controls, Forms, Graphics, Menus, + {$IFDEF VERSION6} Variants, {$ENDIF} OvcBase, OvcCaret, OvcColor, OvcConst, OvcCmd, OvcData, OvcExcpt, OvcIntl, OvcMisc, OvcStr, OvcUser, OvcDate, OvcBordr; @@ -1738,7 +1739,7 @@ begin {$IFNDEF LCL} PostMessage(Controller.Handle, om_SetFocus, 0, LongInt(C)); {$ELSE} - Controller.PostMessage(Controller.Handle, om_SetFocus, 0, LongInt(C)); + Controller.PostMessage(Controller.Handle, om_SetFocus, 0, LPARAM(C)); //64 {$ENDIF} end; @@ -2814,12 +2815,12 @@ end; procedure TOvcBaseEntryField.EMSetSel(var Msg : TMessage); begin with Msg do begin - if lParamLo = $FFFF then + if LoWord(LParam) = $FFFF then //64 SetSelection(0, 0) - else if (lParamLo = 0) and (lParamHi = $FFFF) then + else if (LoWord(LParam) = 0) and (HiWord(LParam) = $FFFF) then //64 SetSelection(0, MaxEditLen) - else if lParamHi >= lParamLo then - SetSelection(lParamLo, lParamHi); + else if HiWord(LParam) >= LoWord(LParam) then //64 + SetSelection(LoWord(LParam), HiWord(LParam)); //64 end; Invalidate; end; @@ -4158,7 +4159,7 @@ var Buf : array[0..MaxEditLen] of AnsiChar; begin StrPCopy(Buf, Value); - Msg.lParam := LongInt(@Buf); + Msg.lParam := LPARAM(@Buf); //64 efPerformEdit(Msg, ccPaste); end; diff --git a/components/orpheus/ovcmisc.pas b/components/orpheus/ovcmisc.pas index b3119b9db..356b743c2 100644 --- a/components/orpheus/ovcmisc.pas +++ b/components/orpheus/ovcmisc.pas @@ -47,9 +47,10 @@ unit ovcmisc; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, MyMisc, {$ENDIF} - Buttons, Classes, Controls, ExtCtrls, Forms, Graphics, - SysUtils, {$IFNDEF LCL} Consts, {$ELSE} LclStrConsts, {$ENDIF} OvcData; + Buttons, Controls, ExtCtrls, Forms, Graphics, + {$IFNDEF LCL} Consts, {$ELSE} LclStrConsts, {$ENDIF} OvcData; { Hdc needs to be an Integer for BCB compatibility } {$IFDEF CBuilder} @@ -658,7 +659,7 @@ type { - HWnd changed to TOvcHWnd for BCB Compatibility } function CheckTaskWindow(Window: TOvcHWnd{HWnd}; - Data: Longint): WordBool; stdcall; + Data: PCheckTaskInfo): WordBool; stdcall; //64 begin Result := True; if PCheckTaskInfo(Data)^.FocusWnd = Window then begin @@ -674,9 +675,9 @@ begin Info.FocusWnd := GetActiveWindow; Info.Found := False; {$IFNDEF DARWIN} - EnumThreadWindows(GetCurrentThreadID, @CheckTaskWindow, Longint(@Info)); + EnumThreadWindows(GetCurrentThreadID, @CheckTaskWindow, LPARAM(@Info)); //64 {$ELSE} - EnumThreadWindows(LongWord(GetCurrentThreadID), @CheckTaskWindow, Longint(@Info)); + EnumThreadWindows(LongWord(GetCurrentThreadID), @CheckTaskWindow, LPARAM(@Info)); //64 {$ENDIF} Result := Info.Found; end; diff --git a/components/orpheus/ovcsf.pas b/components/orpheus/ovcsf.pas index 9ce395d29..8c4ade614 100644 --- a/components/orpheus/ovcsf.pas +++ b/components/orpheus/ovcsf.pas @@ -463,7 +463,7 @@ procedure TOvcCustomSimpleField.efEdit(var Msg : TMessage; Cmd : Word); end; ccMouse : if Len > 0 then begin - efHPos := efGetMousePos(SmallInt(Msg.lParamLo)); + efHPos := efGetMousePos(SmallInt(LoWord(Msg.LParam))); //64 {drag highlight initially if shift key is being pressed} if (GetKeyState(vk_Shift) < 0) then begin SelExtended := True; @@ -484,12 +484,12 @@ procedure TOvcCustomSimpleField.efEdit(var Msg : TMessage; Cmd : Word); end; ccMouseMove : if Len > 0 then begin - efHPos := efGetMousePos(SmallInt(Msg.lParamLo)); + efHPos := efGetMousePos(SmallInt(LoWord(Msg.LParam))); //64 UpdateSel; end; ccDblClk : if Len > 0 then begin - efHPos := efGetMousePos(SmallInt(Msg.lParamLo)); + efHPos := efGetMousePos(SmallInt(LoWord(Msg.LParam))); //64 WordLeftPrim; SaveHPos := efHPos; efSelStart := SaveHPos; @@ -784,7 +784,7 @@ procedure TOvcCustomSimpleField.efEdit(var Msg : TMessage; Cmd : Word); ccExtendRight, ccExtendEnd, ccExtWordRight : efSelEnd := 1; ccMouseMove : - if efGetMousePos(SmallInt(Msg.lParamLo)) > 0 then + if efGetMousePos(SmallInt(LoWord(Msg.LParam))) > 0 then //64 efSelEnd := 1 else efSelEnd := 0; diff --git a/components/orpheus/ovctable.pas b/components/orpheus/ovctable.pas index ff0f61e85..4a13447da 100644 --- a/components/orpheus/ovctable.pas +++ b/components/orpheus/ovctable.pas @@ -46,8 +46,9 @@ unit ovctable; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, MyMisc, {$ENDIF} - SysUtils, Graphics, Classes, Controls, Forms, StdCtrls, + Graphics, Controls, Forms, StdCtrls, Menus, Dialogs, OvcMisc, OvcData, OvcConst, OvcBase, OvcCmd, OvcTCmmn, OvcTCAry, OvcTSelL, OvcTCell, OvcTCHdr, OvcTGPns, OvcTbClr, OvcTbRws, OvcTbCls, OvcDrag; @@ -5427,7 +5428,7 @@ procedure TOvcCustomTable.ctimQueryColor(var Msg : TMessage); {--------} procedure TOvcCustomTable.ctimQueryFont(var Msg : TMessage); begin - Msg.Result := longint(Font); + Msg.Result := LRESULT(Font); //64 end; {--------} procedure TOvcCustomTable.ctimQueryLockedCols(var Msg : TMessage); diff --git a/components/orpheus/ovctcbef.pas b/components/orpheus/ovctcbef.pas index afd2acd47..c3a4fb7e7 100644 --- a/components/orpheus/ovctcbef.pas +++ b/components/orpheus/ovctcbef.pas @@ -41,8 +41,9 @@ unit ovctcbef; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, {$ELSE} LclIntf, LclType, MyMisc, {$ENDIF} - SysUtils, Classes, Graphics, Controls, Forms, + Graphics, Controls, Forms, OvcBase, OvcCmd, OvcEF, OvcCaret, OvcTCmmn, OvcTCell, OvcTable, OvcTCStr; type diff --git a/components/orpheus/ovctcbmp.pas b/components/orpheus/ovctcbmp.pas index 24a858940..2521709db 100644 --- a/components/orpheus/ovctcbmp.pas +++ b/components/orpheus/ovctcbmp.pas @@ -41,8 +41,9 @@ unit ovctcbmp; interface uses - {$IFNDEF LCL} Windows, {$ELSE} LclIntf, MyMisc, {$ENDIF} - SysUtils, Graphics, Classes, OvcTCmmn, OvcTCell; + SysUtils, Classes, + {$IFNDEF LCL} Windows, {$ELSE} LclIntf, LclType, MyMisc, {$ENDIF} + Graphics, OvcTCmmn, OvcTCell; type TOvcTCBaseBitMap = class(TOvcBaseTableCell) diff --git a/components/orpheus/ovctccbx.pas b/components/orpheus/ovctccbx.pas index b16826941..a32b87ca5 100644 --- a/components/orpheus/ovctccbx.pas +++ b/components/orpheus/ovctccbx.pas @@ -47,8 +47,9 @@ unit ovctccbx; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, MyMisc, {$ENDIF} - SysUtils, Graphics, Classes, Controls, Forms, StdCtrls, + Graphics, Controls, Forms, StdCtrls, OvcMisc, OvcTCmmn, OvcTCell, OvcTCStr; type diff --git a/components/orpheus/ovctcedt.pas b/components/orpheus/ovctcedt.pas index 458a36301..7f1154903 100644 --- a/components/orpheus/ovctcedt.pas +++ b/components/orpheus/ovctcedt.pas @@ -41,8 +41,9 @@ unit ovctcedt; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, MyMisc, {$ENDIF} - SysUtils, Classes, Controls, Forms, StdCtrls, + Controls, Forms, StdCtrls, OvcTCmmn, OvcTCell, OvcTCStr, Graphics; { - for default color definition} diff --git a/components/orpheus/ovctcell.pas b/components/orpheus/ovctcell.pas index 53b0ec6d7..212cceb4c 100644 --- a/components/orpheus/ovctcell.pas +++ b/components/orpheus/ovctcell.pas @@ -41,8 +41,9 @@ unit ovctcell; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, MyMisc, {$ENDIF} - SysUtils, Graphics, Classes, Controls, + Graphics, Controls, OvcTCmmn, OvcSpAry, OvcVer; type @@ -237,7 +238,7 @@ type function CanStopEditing(SaveValue : boolean) : boolean; {for Orpheus 1.0 compatibility} function FilterTableKey(var Msg : TWMKey) : TOvcTblKeyNeeds; virtual; {.Z+} - procedure PostMessageToTable(Msg, wParam, lParam : longint); + procedure PostMessageToTable(Msg: UINT; wParam: WPARAM; lParam: LPARAM); //64 {.Z-} procedure SendKeyToTable(var Msg : TWMKey); procedure SaveEditedData(Data : pointer); virtual; @@ -549,7 +550,7 @@ procedure TOvcBaseTableCell.tcPaint(TableCanvas : TCanvas; end; end; {--------} -procedure TOvcBaseTableCell.PostMessageToTable(Msg, wParam, lParam : longint); +procedure TOvcBaseTableCell.PostMessageToTable(Msg: UINT; wParam: WPARAM; lParam: LPARAM); //64 begin if Assigned(FTable) and FTable.HandleAllocated then PostMessage(FTable.Handle, Msg, wParam, lParam) @@ -710,7 +711,7 @@ procedure TOvcBaseTableCell.SetTable(T : TOvcTableAncestor); if (not Assigned(T)) or (T is TOvcTableAncestor) then begin if Assigned(FTable) and FTable.HandleAllocated then - SendMessage(FTable.Handle, ctim_RemoveCell, 0, longint(Self)); + SendMessage(FTable.Handle, ctim_RemoveCell, 0, LPARAM(Self)); //64 FTable := T; FOnCfgChanged := nil; FReferences := 0; diff --git a/components/orpheus/ovctcgly.pas b/components/orpheus/ovctcgly.pas index 06007cc78..be6ba3269 100644 --- a/components/orpheus/ovctcgly.pas +++ b/components/orpheus/ovctcgly.pas @@ -41,8 +41,9 @@ unit ovctcgly; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, MyMisc, {$ENDIF} - SysUtils, Graphics, Classes, Controls, + Graphics, Controls, OvcTCmmn, OvcTCell, OvcTGRes, OvcTCBmp; type diff --git a/components/orpheus/ovctcmmn.pas b/components/orpheus/ovctcmmn.pas index 6db3f7bd3..ef28a80c6 100644 --- a/components/orpheus/ovctcmmn.pas +++ b/components/orpheus/ovctcmmn.pas @@ -41,8 +41,9 @@ unit ovctcmmn; interface uses + SysUtils, Classes, {$IFNDEF LCL} Windows, Messages, {$ELSE} LclIntf, LMessages, LclType, MyMisc, {$ENDIF} - SysUtils, Graphics, Forms, StdCtrls, Classes, Controls, + Graphics, Forms, StdCtrls, Controls, OvcBase, OvcData, OvcExcpt; {---Enumeration types} diff --git a/components/orpheus/ovcvlb.pas b/components/orpheus/ovcvlb.pas index 11e5d1c0c..8474a4668 100644 --- a/components/orpheus/ovcvlb.pas +++ b/components/orpheus/ovcvlb.pas @@ -1107,9 +1107,9 @@ end; procedure TOvcCustomVirtualListBox.LBSelItemRange(var Msg : TMessage); begin - if FMultiSelect and (Msg.wParamLo <= lHighIndex) - and (Msg.wParamHi <= lHighIndex) then begin - vlbSelectRangePrim(Msg.lParamLo, Msg.lParamHi, Msg.wParam > 0); + if FMultiSelect and (LoWord(Msg.WParam) <= lHighIndex) //64 + and (HiWord(Msg.WParam) <= lHighIndex) then begin //64 + vlbSelectRangePrim(LoWord(Msg.LParam), HiWord(Msg.LParam), Msg.wParam > 0); //64 Msg.Result := 0; end else Msg.Result := LB_ERR; diff --git a/components/orpheus/tests/TestCalendar/unit1.pas b/components/orpheus/tests/TestCalendar/unit1.pas index c7dcf87c3..72fafe7f2 100644 --- a/components/orpheus/tests/TestCalendar/unit1.pas +++ b/components/orpheus/tests/TestCalendar/unit1.pas @@ -23,11 +23,9 @@ implementation {$IFNDEF LCL} {$R *.dfm} +{$ELSE} +{$R *.lfm} {$ENDIF} -initialization -{$IFDEF LCL} -{$I unit1.lrs} {Include form's resource file} -{$ENDIF} end. diff --git a/components/orpheus/tests/TestFlexEdit/unit1.pas b/components/orpheus/tests/TestFlexEdit/unit1.pas index 1d014ec80..d975a084b 100644 --- a/components/orpheus/tests/TestFlexEdit/unit1.pas +++ b/components/orpheus/tests/TestFlexEdit/unit1.pas @@ -33,6 +33,8 @@ implementation {$IFNDEF LCL} {$R *.dfm} +{$ELSE} +{$R *.lfm} {$ENDIF} procedure TForm1.O32FlexEdit1UserValidation(Sender: TObject; @@ -72,9 +74,4 @@ begin {$ENDIF} end; -initialization -{$IFDEF LCL} -{$I unit1.lrs} {Include form's resource file} -{$ENDIF} - end. diff --git a/components/orpheus/tests/TestLabel/unit1.pas b/components/orpheus/tests/TestLabel/unit1.pas index 1ea0615b9..65596c726 100644 --- a/components/orpheus/tests/TestLabel/unit1.pas +++ b/components/orpheus/tests/TestLabel/unit1.pas @@ -27,11 +27,9 @@ implementation {$IFNDEF LCL} {$R *.dfm} +{$ELSE} +{$R *.lfm} {$ENDIF} -initialization -{$IFDEF LCL} -{$I Unit1.lrs} {Include form's resource file} -{$ENDIF} end. diff --git a/components/orpheus/tests/TestRLbl/unit1.pas b/components/orpheus/tests/TestRLbl/unit1.pas index 3fb43a467..ac9c87b44 100644 --- a/components/orpheus/tests/TestRLbl/unit1.pas +++ b/components/orpheus/tests/TestRLbl/unit1.pas @@ -26,11 +26,9 @@ implementation {$IFNDEF LCL} {$R *.dfm} +{$ELSE} +{$R *.lfm} {$ENDIF} -initialization -{$IFDEF LCL} -{$I Unit1.lrs} {Include form's resource file} -{$ENDIF} end. diff --git a/components/orpheus/tests/TestSimpField/unit1.pas b/components/orpheus/tests/TestSimpField/unit1.pas index 59f4de7df..401319b05 100644 --- a/components/orpheus/tests/TestSimpField/unit1.pas +++ b/components/orpheus/tests/TestSimpField/unit1.pas @@ -32,6 +32,8 @@ implementation {$IFNDEF LCL} {$R *.dfm} +{$ELSE} +{$R *.lfm} {$ENDIF} @@ -59,9 +61,5 @@ begin ErrorCode := oeInvalidNumber; end; -initialization -{$IFDEF LCL} -{$I unit1.lrs} {Include form's resource file} -{$ENDIF} end. diff --git a/components/orpheus/tests/TestSpinner/unit1.pas b/components/orpheus/tests/TestSpinner/unit1.pas index 51af3684d..27e42b9a6 100644 --- a/components/orpheus/tests/TestSpinner/unit1.pas +++ b/components/orpheus/tests/TestSpinner/unit1.pas @@ -24,12 +24,9 @@ implementation {$IFNDEF LCL} {$R *.dfm} +{$ELSE} +{$R *.lfm} {$ENDIF} -initialization -{$IFDEF LCL} -{$I unit1.lrs} {Include form's resource file} -{$ENDIF} - end. diff --git a/components/orpheus/tests/TestTable/unit1.pas b/components/orpheus/tests/TestTable/unit1.pas index 49fe50ec3..8d0fe64e4 100644 --- a/components/orpheus/tests/TestTable/unit1.pas +++ b/components/orpheus/tests/TestTable/unit1.pas @@ -58,6 +58,8 @@ implementation {$IFNDEF LCL} {$R *.dfm} {Link Delphi form file} +{$ELSE} +{$R *.lfm} {$ENDIF} procedure TForm1.FormCreate(Sender: TObject); @@ -147,9 +149,4 @@ begin end; {TForm1.OvcTCComboBox1Change} -initialization -{$IFDEF LCL} -{$I unit1.lrs} {Include form's Lazarus resource file} -{$ENDIF} - end. diff --git a/components/orpheus/tests/TestTblEdits/unit1.pas b/components/orpheus/tests/TestTblEdits/unit1.pas index 387f53980..f235f2c1b 100644 --- a/components/orpheus/tests/TestTblEdits/unit1.pas +++ b/components/orpheus/tests/TestTblEdits/unit1.pas @@ -55,6 +55,8 @@ implementation {$IFNDEF LCL} {$R *.dfm} {Link Delphi form file} +{$ELSE} +{$R *.lfm} {$ENDIF} procedure TForm1.FormCreate(Sender: TObject); @@ -131,9 +133,5 @@ begin end; end; -initialization -{$IFDEF LCL} -{$I unit1.lrs} {Include form's Lazarus resource file} -{$ENDIF} end. diff --git a/components/orpheus/tests/TestURL/unit1.pas b/components/orpheus/tests/TestURL/unit1.pas index 5487257d2..c8f91c173 100644 --- a/components/orpheus/tests/TestURL/unit1.pas +++ b/components/orpheus/tests/TestURL/unit1.pas @@ -23,11 +23,9 @@ implementation {$IFNDEF LCL} {$R *.dfm} +{$ELSE} +{$R *.lfm} {$ENDIF} -initialization -{$IFDEF LCL} -{$I unit1.lrs} {Include form's resource file} -{$ENDIF} end. diff --git a/components/orpheus/tests/TestVLB/unit1.pas b/components/orpheus/tests/TestVLB/unit1.pas index 6960f8503..aff91f18e 100644 --- a/components/orpheus/tests/TestVLB/unit1.pas +++ b/components/orpheus/tests/TestVLB/unit1.pas @@ -28,6 +28,8 @@ implementation {$IFNDEF LCL} {$R *.dfm} +{$ELSE} +{$R *.lfm} {$ENDIF} procedure TForm1.FormCreate(Sender: TObject); @@ -62,9 +64,5 @@ begin 'You double-clicked item ' + IntToStr(OvcVirtualListBox1.ItemIndex); end; -initialization -{$IFDEF LCL} -{$I unit1.lrs} {Include form's resource file} -{$ENDIF} end.