LowLevelKeyboardProc question

  • Thread starter Thread starter farseer
  • Start date Start date
F

farseer

According to the documentation for LowLevelKeyboardProc, it states "If
the hook procedure processed the message, it may return a nonzero value
to prevent the system from passing the message to the rest of the hook
chain or the target window procedure. "

Now i am doing just in an attempt to prevent certain keys from being
outputted to a text box, but it doesn't seem to work. Under CF1.0 and
WM2003, i was doing pretty much the same thing, but using a dll to
install the hook and handle key presses. There, when i returned a
value of 1 instead of caling CallNextHookEx, the key was efficitvely
suppressed, meaning it would not be outputted to the text box.

is this a bug in CF2.0?
 
hmmm, it must be me. recently, it seems i have not been able to get
any response from these forums.
 
It's just the complexity of the question, I think. Ask how to put a
transparent label on a form and you'll get more answers. If I were you, I'd
just stick with the old native code DLL scheme for doing low-level keyboard
hooking...

Paul T.
 
Thanks,
but here's something interesting...if i am not tracing through the code
(remotely), it works, but if i have a breakpoint or i am stepping
through the code, it doesn't work. It seems the remote debugging tools
of VS2005 are quite buggy. I've also noticed that if you are
attempting to watch messages being sent to a window using VS2005 remote
spy, it will only "catch" the first message and after that, noting
else. The remote spy tool that ships with eVC++ 4.0 behaves correctly.

Tracing through code in VS2005 remotely is also much slower than it was
with 2003.
 
Sounds like there might be a bug in CoreCon as far as debugging (or a
problem, let's say, rather than a bug). I haven't noticed single-stepping
being slower with VS2005, but I haven't done a lot of stuff with it, so far.

This would be something nice to have a bug report submitted to MS for. You
probably can call VS2005 support, report it as a bug and they shouldn't
charge you, once the support engineer verifies that it's a bug...

Paul T.
 
Back
Top