[英]How to react event when window user enter focus into an input area?
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. 我将实现用于Windows的屏幕键盘,该键盘要求OSK应用程序在用户输入输入区域时显示。 For example, when a user open notepad.exe and start clicking on it, my OSK app (currently run in system tray) should be showed.
例如,当用户打开notepad.exe并开始单击它时,应显示我的OSK应用程序(当前在系统托盘中运行)。
I have no idea how to catch those event (user click on notepad app) but I guess it relates to the Win32 things. 我不知道如何捕获这些事件(用户在记事本应用程序上单击),但是我想它与Win32有关。 Can anybody give me a hint for this ?
有人可以给我一个提示吗? Would be highly appreciated.
将不胜感激。
Thanks 谢谢
You'll probably have to set a global hook , using eg SetWindowsHookEx() , in order to monitor the WM_SETFOCUS messages sent to all the edit controls in all the applications. 为了监视发送到所有应用程序中所有编辑控件的WM_SETFOCUS消息,可能必须使用例如SetWindowsHookEx()来设置全局挂钩 。
That's quite intrusive, and that won't be easy. 那是很麻烦的,而且不容易。 Good luck.
祝好运。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.