Vitaliy Margolen : atl: Use CallWindowProc instead of calling old window proc directly.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jun 7 16:26:38 CDT 2007


Module: wine
Branch: master
Commit: a2daceb7c2a7abd9c465771129bdd02ec85b5532
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a2daceb7c2a7abd9c465771129bdd02ec85b5532

Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date:   Thu Jun  7 06:51:42 2007 -0600

atl: Use CallWindowProc instead of calling old window proc directly.

---

 dlls/atl/atl_ax.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c
index 4f0b7cb..8201d09 100644
--- a/dlls/atl/atl_ax.c
+++ b/dlls/atl/atl_ax.c
@@ -848,7 +848,7 @@ static LRESULT IOCS_OnWndProc( IOCS *This, HWND hWnd, UINT uMsg, WPARAM wParam,
             break;
     }
 
-    return OrigWndProc( hWnd, uMsg, wParam, lParam );
+    return CallWindowProcW( OrigWndProc, hWnd, uMsg, wParam, lParam );
 }
 
 static LRESULT CALLBACK AtlHost_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
@@ -862,9 +862,8 @@ static HRESULT IOCS_Attach( IOCS *This, HWND hWnd, IUnknown *pUnkControl ) /* su
     This->hWnd = hWnd;
     IUnknown_QueryInterface( pUnkControl, &IID_IOleObject, (void**)&This->control );
     IOleObject_SetClientSite( This->control, THIS2IOLECLIENTSITE( This ) );
-    This->OrigWndProc = (WNDPROC) GetWindowLongPtrW( This->hWnd, GWLP_WNDPROC );
     SetWindowLongPtrW( hWnd, GWLP_USERDATA, (ULONG_PTR) This );
-    SetWindowLongPtrW( hWnd, GWLP_WNDPROC, (ULONG_PTR) AtlHost_wndproc );
+    This->OrigWndProc = (WNDPROC)SetWindowLongPtrW( hWnd, GWLP_WNDPROC, (ULONG_PTR) AtlHost_wndproc );
 
     return S_OK;
 }




More information about the wine-cvs mailing list