DD.
DD.

Reputation: 89

listening to child window messages in win32

I have a blank window created by my own application in C++. What I do is I bring in another window of some entirely different application and make it a child window of this. It can by skype, firefox, anything.

What I want to do is I want to listen to the messages received by this new window that is now my child window. Unfortunately I don't get the messages through my own WndProc. It is probably doable through Hooks, is there any other simpler way of listening to the child window messages?

Thanks!

Upvotes: 0

Views: 1292

Answers (1)

David Heffernan
David Heffernan

Reputation: 613441

Since windows have thread affinity and since messages are delivered to windows, you need your code in the thread associated with the window. That implies hooks.

Upvotes: 2

Related Questions