在主窗体A上我有一个fsStayOnTop属性的窗体B,B窗体上面listview控件,在鼠标双击事件中用如下的代码:
if GetCursorPos(MyPoint) then
begin
if htOnItem in lvBugPower.GetHitTestInfoAt(MyPoint.X,MyPoint.Y) then
begin
。
end;
end;得到的MyPoint.X和MyPoint.Y不是相对于listview控件的,好像是相对于屏幕的,请问如何转换到相对于控件的坐标?
if GetCursorPos(MyPoint) then
begin
if htOnItem in lvBugPower.GetHitTestInfoAt(MyPoint.X,MyPoint.Y) then
begin
。
end;
end;得到的MyPoint.X和MyPoint.Y不是相对于listview控件的,好像是相对于屏幕的,请问如何转换到相对于控件的坐标?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货