Help me in windows programming....
Hi...
I need to develop a program which can capture the event of another application. For example, i need to capture a particular button click in one application from my program.. is it possible to do dat?? can anyone out there help me in this.. :-(
With regards,
goms.
[296 byte] By [
goms] at [2007-11-19 6:07:14]

# 1 Re: Help me in windows programming....
Well, that is somewhat complex, you need to change the WndProc of the target process. You need to write a DLL that will handle WndProc functionality.
# 2 Re: Help me in windows programming....
Hi Ajay,
Thnx for ur response. Can u explain me in detail about the method of writing that dll.. i don have much knowledge in windows programming..
thanks and regards
goms
goms at 2007-11-10 3:40:35 >

# 3 Re: Help me in windows programming....
Three Ways To Inject Your Code Into Another Process ( http://www.dev-archive.com/Cpp/W-P/system/processesmodules/article.php/c5767/)
Injecting a DLL into Another Process's Address Space ( http://www.dev-archive.com/Cpp/W-P/dll/article.php/c105/)
Ejaz at 2007-11-10 3:41:34 >

# 4 Re: Help me in windows programming....
Hi Ejaz...
I have got an idea on reading the articles.. but as i m new to win32 programming, I can't get a clear view.. How can i identify the ID for the thread i want to monitor.. Actually i need to get the button ID inside the application.. how to do this?
Thanks & Regards,
goms.
goms at 2007-11-10 3:42:38 >

# 5 Re: Help me in windows programming....
You are new to Windows Programming, so I recommend you to keep programming your 'windows' only, and dont disturb others. ;)
There is so much ground you need to cover up... Windows seems to have easy UI, but programming it is quite difficult.
# 6 Re: Help me in windows programming....
Well, you have picked an advance topic being a novice anyway. This topic has been discussed in various ways many time. There are 2 types of hooks
1) Application Wide (for hooking particular application)
2) System Wide (for monitoring entire system)
Search for "Application wide hook" and you'll find plenty of information. Also, have a look at this (http://www.dev-archive.com/Cpp/W-P/system/misc/article.php/c5733/) for application wide hook reference.
But be careful, working at low level can destable your system as well, in case you make some mistake, which goes unidentified.
Ejaz at 2007-11-10 3:44:43 >

# 7 Re: Help me in windows programming....
Well, other than hooking, replacing WNDPROC is also a good option... :thumb:
Regards.
# 8 Re: Help me in windows programming....
Hi ajay & Ejay,
Can you tell me in detail about the WNDPROC? Can you suggest me which one will be a feasible solution for this??
Thanks & Regards,
goms.
goms at 2007-11-10 3:46:48 >

# 9 Re: Help me in windows programming....
I dont not recommend you to play with Windows (programming) like this. First you should know how to process messages of your own windows, own windows in different processes (IPC mechanisms) and so on.
Using windows hooks or changing remote process' WNDPROC is an advanced programming technique and should (must) not be the starting point for learning WP.