How to react event when window user enter focus into an input area?
-
09-10-2019 - |
Question
I'm going to implementing an On Screen Keyboard for Window which requires the OSK app to show when an user enter an input area. For example, when a user open notepad.exe and start clicking on it, my OSK app (currently run in system tray) should be showed.
I have no idea how to catch those event (user click on notepad app) but I guess it relates to the Win32 things. Can anybody give me a hint for this ? Would be highly appreciated.
Thanks
Solution
You'll probably have to set a global hook, using e.g. SetWindowsHookEx(), in order to monitor the WM_SETFOCUS messages sent to all the edit controls in all the applications.
That's quite intrusive, and that won't be easy. Good luck.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow