PC Review


Reply
Thread Tools Rate Thread

Another PreMessageFilter problem!

 
 
tclancey
Guest
Posts: n/a
 
      22nd Mar 2007
Hi all.

I've managed to get somewhere with this, in fact just about got it sorted
except that not all mouse events are being logged.

So far I'm checking for
256, 257, 513, 514, 515, 516, 517, 518
Key down, Key up, Left and Right Click and double clicks. For the most part
this is fine but this is not catching clicks that are performed on menus or
tool bars. They must have different codes.

Has anyone got any ideas?

Cheers,
Tull.


 
Reply With Quote
 
 
 
 
Brian Gideon
Guest
Posts: n/a
 
      22nd Mar 2007
On Mar 22, 10:26 am, "tclancey" <t...@idcodeware.co.uk> wrote:
> Hi all.
>
> I've managed to get somewhere with this, in fact just about got it sorted
> except that not all mouse events are being logged.
>
> So far I'm checking for
> 256, 257, 513, 514, 515, 516, 517, 518
> Key down, Key up, Left and Right Click and double clicks. For the most part
> this is fine but this is not catching clicks that are performed on menus or
> tool bars. They must have different codes.
>
> Has anyone got any ideas?
>
> Cheers,
> Tull.


Okay, here are some things to consider.

First, IMessageFilter is not reliable for intercepting all messages.
It will only see posted messages that appear in the message queue. It
does not included messages sent through SendMessage.

Second, overriding your forms WndProc is a little more reliable since
all messages targeting that window pass through that method. One
problem is that some controls create top level windows. In other
words, messages may be dispatched to a specific control's WndProc
method without being routed through the form's WndProc method.

Third, a windows message hook is the only way you can intercept *all*
messages on the thread. You see more information here.

http://support.microsoft.com/kb/318804/en-us

 
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
problem after problem after problem - winXP wont start! =?Utf-8?B?TWF2aXJpY2s=?= Windows XP Help 2 23rd Apr 2006 02:55 PM
Problems With Adaptec 2400a RAID Card. (rare problem ? ? ? or Common Problem...? ? ?) Starz_Kid Computer Hardware 0 28th Dec 2005 05:36 AM
OpenNetCF PreMessageFilter problem with VB.net Enrico Pavesi Microsoft Dot NET Compact Framework 4 22nd Mar 2005 08:54 AM
hibernation problem! problem!, Power Option problem! Farzad Hayati Microsoft Windows 2000 Hardware 2 5th Feb 2004 10:22 PM
hibernation problem! problem!, Power Option problem! Farzad Hayati Microsoft Windows 2000 Advanced Server 2 5th Feb 2004 10:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:25 AM.