I'm curious as to the specifics of SetWindowsHookEx() ... I have installed
a hook with a NULL htask parameter to fetch system-wide mouse messages.
As long as my main window is visible, the hook is called just fine, regardless
of which program has the focus. However, when I click on a desktop icon my
hook is never called again and I must terminate my program.
The only thing I can think of is the statement in the "Programmer's Reference,
Volume 2: Functions" that says:
"... All system hook functions must be in libraries ..."
Does this mean that my hook function must reside in a DLL? If so, why is it
working "some of the time but not all of the time?"
Any info you might have would be appreciated! I'm really stumpped on this
one!
--kevin
--
Kevin W. Hammond
ham...@image.ctt.com
As a followup to my own post ... I did some testing and placed my hook
procedure in a DLL. I now no longer have the problem of getting the hook
procedure called depending on the active application and state.
It also worked well enough to allow me to hide the application's main
window.