开发者

How to react event when window user enter focus into an input area?

开发者 https://www.devze.com 2023-01-25 14:14 出处:网络
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 us开发者_C百科er open notepad.exe and start clickin

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 us开发者_C百科er 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号