procedure Tbar.WMNChitTest(var Msg: TWMNChitTest);
begin
inherited;
if msg.Result=htclient then msg.Result:=htcaption;
end;
...全文
2257打赏收藏
怎样给form1自定义mouse doubleclick消息响应!!!!!!!!
因为我在程序中定义了如下一个消息,所有原来form的鼠标事件都给屏蔽了 结果无法使用form的FormDblClick事件 我想自定义一个事件,谁来帮帮我 procedure Tbar.WMNChitTest(var Msg: TWMNChitTest); begin inherited; if msg.Result=htclient then msg.Result:=htcaption; end;
procedure TForm1.WndProc(var Message: TMessage);
var
begin
inherited;
case message.Msg of
WM_LBUTTONDBLCLK:
begin
od1.Execute;
exit;
end;
WM_NCHITTEST:
begin
if (message.Result=htclient) then message.Result:=htcaption;
Exit;
end;
end;