| Author |
Message |
Robskew
Joined: 02 Sep 2008 Posts: 1
|
Posted: Tue Sep 02, 2008 10:13 am Post subject: cancel mouse click on a control |
|
|
Hi everybody,
i'm creating an application using an external liberay that creates a control.If you click on this control it reacts on the mouse click, but i want to cancel this. I want to implement my own mouse click event for that control and cancel the click message to the control. Problem is that the control receives the mouse click event as first.
I tries to use wndproc to implement my own code but still the control receive the click first.
Can this be done by using a hook?
How do i implement this and then cancel the mouse event before it reaches the control??
Thnx |
|
| Back to top |
|
 |
Robert
Joined: 30 Oct 2006 Posts: 428 Location: Cambridge, UK
|
Posted: Tue Sep 02, 2008 10:55 am Post subject: |
|
|
Now, this is without having tried doing this at all, so I might be talking complete rubbish .
However, what you could try doing is to subclass the window handle of the control in question (see http://tinyurl.com/6m8g37), then intercept the click messages, passing any other messages on to the original WndProc (http://tinyurl.com/6ap5lr).
Hopefully that makes sense!
Cheers,
Rob _________________ Robert Chipperfield
Developer, Red Gate Software Ltd |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group