5,392
社区成员
发帖
与我相关
我的任务
分享
if acticeControl is Tmemo then
begin
Tmemo(ActiveControl).left := xx;
end;
FocusHook:=SetWindowsHookEx(WH_CBT,@FocusHookProc,HInstance,0);
function FocusHookProc(nCode: Integer;WParam: WPARAM;LParam: LPARAM): LRESULT;stdcall;
var
MainH:HWND;
begin
if nCode<0 then
Result:= CallNextHookEx(FocusHook,nCode,WParam,LParam)
else
begin
if nCode=HCBT_SETFOCUS then
begin
//取得焦點。
end;
Result:= CallNextHookEx(FocusHook,nCode,WParam,LParam)
end;
end;