Control has Input Focus? (from Handle): focus...
function ControlHasFocus(ControlHandle: HWND): Boolean;
var FGW: HWND;
begin
FGW:= GetForeGroundWindow;
AttachThreadInput(GetCurrentThreadID, //thread to attach
GetWindowThreadProcessID(FGW) //thread to attach to
true); //attach or detach
result:= (ControlHandle = GetFocus);
AttachThreadInput(GetCurrentThreadID, //thread to attach
GetWindowThreadProcessID(FGW) //thread to attach to
false); //attach or detach
end;
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。