Link to home
Start Free TrialLog in
Avatar of BrendaMcMahon
BrendaMcMahonFlag for United States of America

asked on

How to hook to another windows to determine new windows was created ?

Hi
I want to write a small app by C# with features:
- It will hook to Windows or specific Windows (like Internet Explorer)
- For Windows Hook (is it System Hooking ?) it'll determine have any new windows was created and raise event: Example (When notepad was opened- Notepad Window was created.It'll detech and raise event)
- Have same thing with specific Windows. Example: It'll determind Yahoo Messenger created new Yahoo Window Chatting (the windows use for chatting).

Thank you
Avatar of alienvoice
alienvoice
Flag of Australia image

Ok, so you want to write this program, what exactly are you asking us thou?
Avatar of BrendaMcMahon

ASKER

Yah.
I dunt know how to system hook in C# (in this case is "system hooking").
Would you mind help me a example like above ?
Thank you
Avatar of mannujam
mannujam

In normal case you can hook createwindow funtion, but every time so much amount of window are created that you can overload the hookproc and your system can hang. So you have to write a device driver for the same . This is not so straight forward process.
.. uhm thank you. For wide system hooking looking it'll trouble.
But how about for specific window ? Like yahoo messenger.
I want to catch any window created by specific window ?

Thank you
Simply WH_CBT (among all the standard methods...)
Would you mind give me a simply sample source code ?
Thax
ASKER CERTIFIED SOLUTION
Avatar of mannujam
mannujam

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Almost done with this.
Thank you