简体   繁体   English

远程进程的WM_PAINT

[英]WM_PAINT of a remote process

I want to "intercept" the WM_PAINT msg of an other process chatBox. 我想“拦截”另一个进程chatBox的WM_PAINT消息。 the function: GetMessage(msg, hwnd, 0, 0) seems to be perfect but i'm not receiving any messages (I tryied as super user) from now my C++ code find the good child windows and try to "getMessage", What did I forget? 函数:GetMessage(msg,hwnd,0,0)似乎是完美的,但是从现在起,我的C ++代码没有收到任何消息(我尝试过以超级用户身份),找到了好的子窗口并尝试“ getMessage”,我忘了吗 I necessarily have to inject this code in a dll to my other process? 我是否必须将此代码注入dll到其他进程中?

Message queues are per thread, so you cannot GetMessage for the other thread or process. 消息队列是每个线程的,因此您不能为其他线程或进程获取GetMessage。

What you need is to install a window hook. 您需要安装一个窗户挂钩。 See SetWindowsHookEx with WH_CALLWNDPROC hook type. 请参阅具有WH_CALLWNDPROC挂钩类型的SetWindowsHookEx Your dll will be loaded to all processes and intercept all window messages. 您的dll将被加载到所有进程并拦截所有窗口消息。

Then decide which messages/processes/windows you need to ignore and which to handle. 然后确定需要忽略哪些消息/过程/窗口以及要处理哪些消息/过程/窗口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM