请问没有OnMouseLeave事件的控件如何判断鼠标离开?(20分)

  • 主题发起人 tianjh007
  • 开始时间
T

tianjh007

Unregistered / Unconfirmed
GUEST, unregistred user!
请问没有OnMouseLeave事件的控件如何判断鼠标离开?
 
Procedure OnMouseLeave( msg : TCMMouseLeave ); message cm_OnMouseLeave;
 
private
proocedure CMMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE;

implementation
procedure TSomeForm.CMMouseLeave(var Msg: TMessage);
begin
{ anObject is the control which the mouse has just gone out of }
anObject := TObject(Msg.lParam);
if anObject nil then begin
{ First, you must find WHICH is the control }
{ the mouse cursor has just left, }
{ then, determine what action to do, etc... }
end;
end;

 
处理 CMMouseLeave!!
 
谢谢各位
我是初学者,积分少,问题又多,只好少给一点了,不好意思

 
顶部