Click to See Complete Forum and Search --> : System wide hook & Window Subclass


Noliuz
November 24th, 2004, 03:23 AM
I use System wide hook to get the HWND of textfield To , Cc , Bcc of the Microsoft Outlook sending message window. And then use function SetWindowLong to change the Window Procedure of these textfields. My Window Procedure is below.

LRESULT CALLBACK SpyWndProc1(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
OldProc1 = (WNDPROC)GetProp(hWnd,"OldWindowProcedure");

return CallWindowProc(OldProc1,hWnd,msg,wParam,lParam);
}

As you see, I just do nothing ,only call the Old Window Procedure of the textfields. The problem is when I move mouse over or focus on the textfields, the Outlook window is closed.It close all windows of Microsoft Outlook.But there isn't any error window popup. This code is work fine on Outlook Express.I have no idea now. If someone know , please help...