How to filter the key event
Posted: Thu Nov 08, 2007 2:27 pm
Hello all senior C++ Developers
I want my module writtent in C++ to be notified when 'I' key is pressed. How I filter the keyboard event? I know I should use this function:
int __stdcall OnDDEvent(DWORD EventType, void *EventParams)
The EventType must be DDEVENT_ON_KEYBOARD.
I am gettting stuck with *EventParams,
Should it be LWORD(*EventParams)=='I' ???
Here is the function I modified (but not working for me)
int __stdcall OnDDEvent(DWORD EventType, void *EventParams)
{
if (EventType == DDEVENT_ON_KEYBOARD)
{
if (WPARAM(EventParams)=='I')
{
MessageBox(NULL,"You Press I key",NULL,0);
}
}
return FALSE;
}
Thanks in advance.
Chattana.
I want my module writtent in C++ to be notified when 'I' key is pressed. How I filter the keyboard event? I know I should use this function:
int __stdcall OnDDEvent(DWORD EventType, void *EventParams)
The EventType must be DDEVENT_ON_KEYBOARD.
I am gettting stuck with *EventParams,
Should it be LWORD(*EventParams)=='I' ???
Here is the function I modified (but not working for me)
int __stdcall OnDDEvent(DWORD EventType, void *EventParams)
{
if (EventType == DDEVENT_ON_KEYBOARD)
{
if (WPARAM(EventParams)=='I')
{
MessageBox(NULL,"You Press I key",NULL,0);
}
}
return FALSE;
}
Thanks in advance.
Chattana.