procedure Tfrm_MoudleManager.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
if (grd_MoudleList.Handle = Msg.hwnd) and
((Msg.message = WM_LBUTTONDOWN) or (Msg.message = WM_RBUTTONDOWN)) then
begin
lbl1.Caption := IntToStr(StrToInt(lbl1.Caption) + 1);
DoSomething...
Handled := True;
end;
end;
end;
当我点击一下grd_MoudleList时候,lbl1的caption会加3,也就是发了3次点击消息。。这是为什么?
点击动作包括按下和抬起,你的消息都会被触发
鼠标放下,收起,点击三个事件。你可设定条件,限定某事件。