win32 interface: use GetWindowLongW and SetWindowLongW for UnicodeEnabledOS (bug #8403)

git-svn-id: trunk@10686 -
This commit is contained in:
vincents 2007-02-26 19:42:59 +00:00
parent 351a4fbee6
commit 6368fcf727

View File

@ -2200,9 +2200,15 @@ Begin
//TODO:Started but not finished
Assert(False, Format('Trace:> [TWin32WidgetSet.GETWINDOWLONG] HWND: 0x%x, int: 0x%x (%d)', [Handle, int, int]));
{$ifdef ver2_0}
Result := Windows.GetWindowLong(Handle, int);
if UnicodeEnabledOS then
Result := Windows.GetWindowLongW(Handle, int)
else
Result := Windows.GetWindowLong(Handle, int);
{$else}
Result := Windows.GetWindowLongPtr(Handle, int);
if UnicodeEnabledOS then
Result := Windows.GetWindowLongPtrW(Handle, int)
else
Result := Windows.GetWindowLongPtr(Handle, int);
{$endif}
Assert(False, Format('Trace:< [TWin32WidgetSet.GETWINDOWLONG] HWND: 0x%x, int: 0x%x (%d) --> 0x%x (%d)', [Handle, int, int, Result, Result]));
End;
@ -3147,9 +3153,15 @@ Begin
//TODO: Finish this;
Assert(False, Format('Trace:> [TWin32WidgetSet.SetWindowLong] HWND: 0x%x, Idx: 0x%x(%d), Value: 0x%x(%d)', [Handle, Idx, Idx, NewLong, NewLong]));
{$ifdef ver2_0}
Result := Windows.SetWindowLong(Handle, Idx, NewLong);
if UnicodeEnabledOS then
Result := Windows.SetWindowLongW(Handle, Idx, NewLong)
else
Result := Windows.SetWindowLong(Handle, Idx, NewLong);
{$else}
Result := Windows.SetWindowLongPtr(Handle, Idx, NewLong);
if UnicodeEnabledOS then
Result := Windows.SetWindowLongPtrW(Handle, Idx, NewLong)
else
Result := Windows.SetWindowLongPtr(Handle, Idx, NewLong);
{$endif}
Assert(False, Format('Trace:< [TWin32WidgetSet.SetWindowLong] HWND: 0x%x, Idx: 0x%x(%d), Value: 0x%x(%d) --> 0x%x(%d)', [Handle, Idx, Idx, NewLong, NewLong, Result, Result]));
End;