I have created a standard windows forms application in Visual Studio 2010.
public ref class Form1 : public System::Windows::Forms::Form
{
...
}
I want to capture keydown events globally (if I am in an other application, my form shall react to keydowns too).
I am using RegisterHotKey and WndProc to listen to keydowns. But this blocks the regeisterd keys for other applications:
RegisterHotKeyA((HWND) this->Handle.ToPointer(), iHotkID_Marker, 0, VK_ADD );
Is there a way to pass the keys to the system or to capture keydowns without blocking?
Thanks for help.
Not sure why you’re using RegisterHotKey, but you probably want to look at creating a Windows Hook procedure to obtain global keyboard events.