win32: fix 64bit compilation (issue #0016449)

git-svn-id: trunk@25322 -
This commit is contained in:
paul 2010-05-12 00:56:10 +00:00
parent c39c87916a
commit 990ef2a038
2 changed files with 8 additions and 2 deletions

View File

@ -210,7 +210,8 @@ function SetTextCharacterExtra(_HDC: HDC; NCharExtra: Integer): Integer; overrid
function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override;
function SetViewPortExtEx(DC: HDC; XExtent, YExtent : Integer; OldSize: PSize): Boolean; override;
function SetViewPortOrgEx(DC: HDC; NewX, NewY: Integer; OldPoint: PPoint): Boolean; override;
function SetWindowExtEx(DC: HDC; XExtent, YExtent: Integer; OldSize: PSize): Boolean; override;function SetWindowLong(Handle: HWND; Idx: Integer; NewLong: PtrInt): PtrInt; override;
function SetWindowExtEx(DC: HDC; XExtent, YExtent: Integer; OldSize: PSize): Boolean; override;
function SetWindowLong(Handle: HWND; Idx: Integer; NewLong: PtrInt): PtrInt; override;
function SetWindowOrgEx(DC: HDC; NewX, NewY: Integer; OldPoint: PPoint): Boolean; override;
function SetWindowPos(HWnd: HWND; HWndInsertAfter: HWND; X, Y, CX, CY: Integer; UFlags: UINT): Boolean; override;
function SetWindowRgn(hWnd: HWND; hRgn: HRGN; bRedraw: Boolean):longint; override;

View File

@ -202,7 +202,12 @@ begin
// init updown control
Info := AllocWindowInfo(UpDown);
Info^.AWinControl := AWinControl;
Info^.DefWndProc := Windows.WNDPROC(SetWindowLong(UpDown, GWL_WNDPROC, PtrInt(@SpinUpDownWndProc)));
{$IFDEF WindowsUnicodeSupport}
if UnicodeEnabledOS then
Info^.DefWndProc := Windows.WNDPROC(SetWindowLongPtrW(UpDown, GWL_WNDPROC, PtrInt(@SpinUpDownWndProc)))
else
{$ENDIF}
Info^.DefWndProc := Windows.WNDPROC(SetWindowLongPtr(UpDown, GWL_WNDPROC, PtrInt(@SpinUpDownWndProc)));
SetProp(UpDown, 'WinControl', PtrUInt(AWinControl));
Result := Params.Window;
end;