PC Review


Reply
Thread Tools Rate Thread

Control Event Monitoring

 
 
jordan.yaker@sbcglobal.net
Guest
Posts: n/a
 
      15th Feb 2007
I am in the process of creating a C# automation application that will
work off of notifications in other applications. I want to be able to
monitor the WM_NOTIFY event for various controls and then take the
corresponding actions (simple automation stuff).

I started out working on this by attempting to hook the parent of the
control that I am interested in. I created an unmanaged C DLL for
setting/clearing the hook, and for passing the messages to my managed
application via the PostMessage method. I am hooking with the
WH_CALLWNDPROC hook type and I just don't ever see the WM_NOTIFY
message. I was hoping that someone would be able to point me in the
right direction here. Anything from examples to tutorials would help.

 
Reply With Quote
 
 
 
 
not_a_commie
Guest
Posts: n/a
 
      15th Feb 2007
> I am hooking with the
> WH_CALLWNDPROC hook type and I just don't ever see the WM_NOTIFY
> message. I was hoping that someone would be able to point me in the
> right direction here. Anything from examples to tutorials would help.


I think that by default Forms in .NET ignore notify messages. Look up
the SetStyle function to see how to change that. (One of the enums for
that enables it, I believe.)

BTW, if the program you're monitoring is one that you have the source
code for, I'd strongly recommend sockets instead of Windows messages.
They're just much more portable.

 
Reply With Quote
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      15th Feb 2007
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am in the process of creating a C# automation application that will
> work off of notifications in other applications. I want to be able to
> monitor the WM_NOTIFY event for various controls and then take the
> corresponding actions (simple automation stuff).
>
> I started out working on this by attempting to hook the parent of the
> control that I am interested in. I created an unmanaged C DLL for
> setting/clearing the hook, and for passing the messages to my managed
> application via the PostMessage method. I am hooking with the
> WH_CALLWNDPROC hook type and I just don't ever see the WM_NOTIFY
> message. I was hoping that someone would be able to point me in the
> right direction here. Anything from examples to tutorials would help.
>



Do you mean that you don't see any WM_NOTIFY message in the target (other) application? You
know that you won't get WM_NOTIFY messages from the target in your C# application, do you?.
Are you sure your hook proc is registered correctly, are you sure the DLL is injected in the
other process?
What message are you posting to the C# application and how do you get at the HWND of the
receiving window?

Willy.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event Monitoring. jay_kbvt Microsoft VB .NET 0 12th Sep 2006 10:02 AM
Event Monitoring. jay_kbvt Microsoft VB .NET 2 10th Sep 2006 08:04 AM
Event Log Monitoring =?Utf-8?B?TWF0?= Microsoft C# .NET 0 16th May 2006 12:36 PM
Event Log Monitoring Scott Microsoft C# .NET 2 19th Feb 2004 07:53 PM
Event Log monitoring NTRay Microsoft Windows 2000 Advanced Server 0 17th Jul 2003 02:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:17 PM.