- April 27, 2010
- 165
- 159
- Home Country
- Italy
- Thread starter
- #51
@Stéphane Lenclud,
I use the attached RawInputHook class to intercept keystrokes.
I think the problem stems from my implementation of IMessageFilter: after ProcessRawInput the function returns true, then the message is stopped..
What do you think?
I could always return false so as to allow the continuation of the message to the next filters
I use the attached RawInputHook class to intercept keystrokes.
I think the problem stems from my implementation of IMessageFilter: after ProcessRawInput the function returns true, then the message is stopped..
Code:
public bool PreFilterMessage(ref Message m)
{
if (m.Msg == WM_INPUT)
{
if (m.WParam == (IntPtr)0 || _backgroundInput)
{
if (KeyDown != null)
{
ProcessRawInput(m.LParam);
return true;
}
}
}
return false;
}
What do you think?
I could always return false so as to allow the continuation of the message to the next filters