Keyboard hook
-
Does anyone have experience with keyboard hooks? I have created a keyboard hook and it works just fine provided the exe driving the dll displays a dialog box with an edit control and the edit control has focus. However, if another app has focus, say Notepad.exe, then the keyboard hook never receives the messages. What I think I need is some way to force the keyboard hook to the top of the message chain. I would like to start a dialog with anyone that has worked with keyboard hooks before. Thank you. PMCGAHAN@UCSWORKS.COM
-
Does anyone have experience with keyboard hooks? I have created a keyboard hook and it works just fine provided the exe driving the dll displays a dialog box with an edit control and the edit control has focus. However, if another app has focus, say Notepad.exe, then the keyboard hook never receives the messages. What I think I need is some way to force the keyboard hook to the top of the message chain. I would like to start a dialog with anyone that has worked with keyboard hooks before. Thank you. PMCGAHAN@UCSWORKS.COM
Are you using SetWindowsHookEx? If so can I see a snippet of the code you are using? ================== The original message was: Does anyone have experience with keyboard hooks?
I have created a keyboard hook and it works just fine provided the exe driving the dll displays a dialog box with an edit control and the edit control has focus.
However, if another app has focus, say Notepad.exe, then the keyboard hook never receives the messages.
What I think I need is some way to force the keyboard hook to the top of the message chain.
I would like to start a dialog with anyone that has worked with keyboard hooks before.
Thank you.
-
Are you using SetWindowsHookEx? If so can I see a snippet of the code you are using? ================== The original message was: Does anyone have experience with keyboard hooks?
I have created a keyboard hook and it works just fine provided the exe driving the dll displays a dialog box with an edit control and the edit control has focus.
However, if another app has focus, say Notepad.exe, then the keyboard hook never receives the messages.
What I think I need is some way to force the keyboard hook to the top of the message chain.
I would like to start a dialog with anyone that has worked with keyboard hooks before.
Thank you.
Here is the ghHook = SetWindowsHookEx(WH_KEYBOARD, &KeyboardProc, ghInstance, NULL); Since I reported the problem, I believe I have found an answer. I am using SendMessage(ghWnd, gnKeyMsg, wParam, lParam); to get information out of keyhook. This dll attaches itself to every process in the system. One dll but many memory spaces. The problem is only the exe that launches the dll sets the value of hgWnd, in all other memory spaces it is NULL. I think what I need to do is set this value in the registery and read it into each memory space. What do you think. Thank you. ================== The original message was: Are you using SetWindowsHookEx? If so can I see a snippet of the code you are using?
==================
The original message was:Does anyone have experience with keyboard hooks?
I have created a keyboard hook and it works just fine provided the exe driving the dll displays a dialog box with an edit control and the edit control has focus.
However, if another app has focus, say Notepad.exe, then the keyboard hook never receives the messages.
What I think I need is some way to force the keyboard hook to the top of the message chain.
I would like to start a dialog with anyone that has worked with keyboard hooks before.
Thank you.
-
Does anyone have experience with keyboard hooks? I have created a keyboard hook and it works just fine provided the exe driving the dll displays a dialog box with an edit control and the edit control has focus. However, if another app has focus, say Notepad.exe, then the keyboard hook never receives the messages. What I think I need is some way to force the keyboard hook to the top of the message chain. I would like to start a dialog with anyone that has worked with keyboard hooks before. Thank you. PMCGAHAN@UCSWORKS.COM
Hi, you can use universal message filters and look for keyboard messagers. I tried other ways too, but no one works. I the sample file you can replace ::GetCurrentThreadId() by NULL to have a system-wide filter. ================== The original message was: Does anyone have experience with keyboard hooks?
I have created a keyboard hook and it works just fine provided the exe driving the dll displays a dialog box with an edit control and the edit control has focus.
However, if another app has focus, say Notepad.exe, then the keyboard hook never receives the messages.
What I think I need is some way to force the keyboard hook to the top of the message chain.
I would like to start a dialog with anyone that has worked with keyboard hooks before.
Thank you.