如何获得窗体内焦点所在控件的指针?
我想知道可以通过什么方法获得在一个窗体内焦点所在的控件的指针,也就是鼠标所在的控件的指针。请高手赐教,谢谢!
[解决办法]
指针获取不到,句柄就可以。
[解决办法]
for I := 0 to ComponentCount - 1 do begin
if Components[I] is TWinControl then begin
if TWinControl(Components[I]).Focused then
……
end;
end;
type
TControlAccess = class(TControl);
……
for I := 0 to ComponentCount - 1 do begin
if Components[I] is TWinControl then begin
if TControlAccess(Components[I]).MouseCapture then begin
//
end;
end;
end;