Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Win32 Capturing child Window messages in parent window

In my Win32 application, a child window is created by a third party SDK.The Window creation process is transparent and I cannot associate a WndProc method with the child Window. I want to be able to capture child window messages in parent window. How can I do this? Any help would be highly appreciated.

like image 428
Farooq Zaman Avatar asked Jul 12 '11 21:07

Farooq Zaman


1 Answers

Have you looked at SetWindowsHookEx? Or if that seems like overkill you could probably just use SetWindowLong with GWL_WNDPROC and define your own custom WinProc then forward to the child window.

There is a pretty good article on MSDN about it.

like image 64
Brandon Moretz Avatar answered Nov 07 '22 18:11

Brandon Moretz