thanks Iain, Actually i tried with both the options like g_MouseHook = SetWindowsHookEx(WH_MOUSE_LL, MouseProc , NULL,0); and g_MouseHook = SetWindowsHookEx(WH_MOUSE, MouseProc , NULL,GetCurrentThreadID()); Still in both the cases MouseProc is not called.