Module: wine Branch: master Commit: fb9b95b7a95e93bb6a8c529313fbf182e7e833d2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fb9b95b7a95e93bb6a8c529313...
Author: Michael Stefaniuc mstefani@redhat.de Date: Fri Feb 6 23:46:59 2009 +0100
riched20: Fix some Win64 compiler warnings.
- A HWND can be safely marshaled over a LONG as its payload is not a pointer but a user handle. - Use GetWindowLongPtr instead of GetWindowLong to retrieve a pointer.
---
dlls/riched20/txthost.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index 5b52b9f..7fc0e5a 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -258,14 +258,14 @@ HRESULT WINAPI ITextHostImpl_TxActivate(ITextHost *iface, LONG *plOldState) { ITextHostImpl *This = (ITextHostImpl *)iface; - *plOldState = (LONG)SetActiveWindow(This->hWnd); + *plOldState = HandleToLong(SetActiveWindow(This->hWnd)); return (*plOldState ? S_OK : E_FAIL); }
HRESULT WINAPI ITextHostImpl_TxDeactivate(ITextHost *iface, LONG lNewState) { - HWND ret = SetActiveWindow((HWND)lNewState); + HWND ret = SetActiveWindow(LongToHandle(lNewState)); return (ret ? S_OK : E_FAIL); }
@@ -323,7 +323,7 @@ HRESULT WINAPI ITextHostImpl_TxGetScrollBars(ITextHost *iface, DWORD *pdwScrollBar) { ITextHostImpl *This = (ITextHostImpl *)iface; - ME_TextEditor *editor = (ME_TextEditor*)GetWindowLongW(This->hWnd, 0); + ME_TextEditor *editor = (ME_TextEditor*)GetWindowLongPtrW(This->hWnd, 0); const DWORD mask = WS_VSCROLL| WS_HSCROLL| ES_AUTOVSCROLL|