简体   繁体   中英

WM_PAINT of a remote process

I want to "intercept" the WM_PAINT msg of an other process chatBox. 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? I necessarily have to inject this code in a dll to my other process?

Message queues are per thread, so you cannot GetMessage for the other thread or process.

What you need is to install a window hook. See SetWindowsHookEx with WH_CALLWNDPROC hook type. Your dll will be loaded to all processes and intercept all window messages.

Then decide which messages/processes/windows you need to ignore and which to handle.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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