BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Strange Mouse Event Behaviour

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.components.writing
View previous topic :: View next topic  
Author Message
David Paquette
Guest





PostPosted: Thu Oct 21, 2004 7:39 pm    Post subject: Strange Mouse Event Behaviour Reply with quote



Hi All,

I'm building a component to be used to build direct manipulation software
in. To test it, I'm building a simple graph editing tool with it.

Here's my problem.

When I left click mouse down on the component, then drag something over the
edge of the component, I continue to receive MouseMove/MouseUp events. This
is the desired behaviour. When I use the Right mouse button, however, the
MouseMove/MouseUp events are not fired when I drag off the edge of the
component.

Does anyone know why the two buttons don't behave the same way, and how I
can solve this problem?

-David


Back to top
David Paquette
Guest





PostPosted: Thu Oct 21, 2004 7:58 pm    Post subject: Re: Strange Mouse Event Behaviour Reply with quote



I Figured it out!

....
private
procedure WMRButtonDown(var Message: TWMRButtonDown); message
WM_RBUTTONDOWN;
....
....
procedure TMyComp.WMRButtonDown(var Message: TWMRButtonDown);
begin
if csCaptureMouse in ControlStyle then MouseCapture := True;
inherited;
end;

....
....
....

It's as simple as that!

-David



"David Paquette" <nothing (AT) hto (DOT) dsafdas> wrote

Quote:
Hi All,

I'm building a component to be used to build direct manipulation software
in. To test it, I'm building a simple graph editing tool with it.

Here's my problem.

When I left click mouse down on the component, then drag something over
the edge of the component, I continue to receive MouseMove/MouseUp events.
This is the desired behaviour. When I use the Right mouse button,
however, the MouseMove/MouseUp events are not fired when I drag off the
edge of the component.

Does anyone know why the two buttons don't behave the same way, and how I
can solve this problem?

-David




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.components.writing All times are GMT
Page 1 of 1

 
Jump to:  
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, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.