Override/Catch Mouse Events

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Beardless2
Cone that earned his stripes
Cone that earned his stripes
Posts: 125
Joined: 02 Feb 2007 09:53

Override/Catch Mouse Events

Postby Beardless2 » 11 Sep 2007 15:37

Hello,

I am trying to catch mouse events on the VLC active X control in Delphi so that i may display a popupmenu when the user right clicks on the VLC control. I have not managed to do this yet, this is my code so far but it doesn't seem to work, can anyone help me?

type
TMyVideo = class(TVLCPlugin)
private
FOnMyMouseDown : TMouseEvent;
procedure WMLButtonDown (var Message: TWMLButtonDown); message WM_LBUTTONDOWN;
procedure WMRButtonDown (var Message: TWMLButtonDown); message WM_RBUTTONDOWN;
protected
procedure MyMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
published
property OnMyMouseDown: TMouseEvent read FOnMyMouseDown write FOnMyMouseDown;
end;


procedure TMyVideo .WMLButtonDown(var Message: TWMLButtonDown);
begin
inherited;
MyMouseDown(mbLeft,[ssLeft],message.XPos,message.YPos);
end;

procedure TMyVideo .WMRButtonDown(var Message: TWMLButtonDown);
begin
inherited;
MyMouseDown(mbRight,[ssRight],message.XPos,message.YPos);
end;

procedure TMyVideo .MyMouseDown(Button: TMouseButton; Shift: TShiftState; X: Integer; Y: Integer);
begin
if Assigned (FOnMyMouseDown) then FOnMyMouseDown(Self, Button, Shift, X, Y);

showmessage('My Mouse Down');

end;

Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 14 guests