type
yourcontrol=class(TCustomControl)
private
....
procedure RightDown(var Message: TWMMouse); message WM_RBUTTONDOWN;
public
....
end;
proceudre YourControl.RightDown(var Message: TWMMouse); message WM_RBUTTONDOWN;
begin
if assigned(OnMouseDown) then
with message do
OnMouseDown(self, mbRight, keytoshiftstate(keys), xpos, ypos);
end;