Window goes invisible when i activate my Hook
Posted on 2009-04-22
I have created a global hook which calls another dll to perform certain actions. The different kind of hooks i am using are WH_CALLWNDPROC, WH_CBT, WH_GETMESSAGE, WH_KEYBOARD, WH_MOUSE, WH_MSGFILTER, WH_SYSMSGFILTER, WH_DEBUG.
On calling a hook procedure through setwindowhookex a function (FARPROC) CallWndProcFunc() is invoked..
LRESULT CALLBACK CallWndProcFunc (int nCode, WPARAM wParam, LPARAM lParam )
return CallNextHookEx(hhookHooks[CALLWNDPROCINDEX], nCode, wParam, lParam);
The issue i face is that the calling of this function turns all menu bars invisible. It is like a ghost image and clicking on it still takes me to the actual form. This is also experienced in all menu options within start -> program for windows.
What could be restricting display of these menu's in my program as it is just a skeleton function.
Any help will be greatly appreciated.