如何将键盘仅挂接到外部应用程序(已标识)? [英] How to hook Keyboard into only an extern application (identified)?

查看:77
本文介绍了如何将键盘仅挂接到外部应用程序(已标识)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我想使用C ++语言将键盘仅挂接到外部应用程序(已标识-例如:记事本)中,我该怎么做?谢谢.

Hi all,
I want to use C++ language to hook Keyboard into only an extern application (identified - e.g: Notepad), how to I do this? Thanks. Can you help me this demo?

推荐答案

一种方法是使用 Google .
Well one method would be to use a Windows Hook in a DLL, and get it to check the Window that has the focus, and see if it belongs to the app you which to monitor. i.e. Does the windows belong to a instance of notepad.exe.

It is very easy to do that, I have done it myself personally for a project I have made.

Or you could just Google for it.


这篇关于如何将键盘仅挂接到外部应用程序(已标识)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆