Aleq
asked on
Set HOOK to local method
I'm creating a component, that must process parent's messages. I would like to use hooks, but I don't know, how to set hook to local (component's) method ...
function Mycomponent.MessageHookPro c(Code: Integer; wParam: WPARAM; lParam: LPARAM): lResult stdcall;
begin
Ā ......
end;
constructor Mycomponent.create(AOwner : TComponent);
begin
SetWindowsHookEx(WH_CallWn dProc, MessageHookProc, 0, GetCurrentThreadId);
end;
Global method is not a solution, since the method is only one and I will have more than one instances on different forms. Any Hint ? thanx
function Mycomponent.MessageHookPro
begin
Ā ......
end;
constructor Mycomponent.create(AOwner : TComponent);
begin
SetWindowsHookEx(WH_CallWn
end;
Global method is not a solution, since the method is only one and I will have more than one instances on different forms. Any Hint ? thanx
When you say events, do you mean windows messages, or things like OnClick etc...
Cheers,
Raymond.
Cheers,
Raymond.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Wow ! It looks very promising.
I'll try it ASAP
I'll try it ASAP
ASKER
Wow ! It looks very promising.
I'll try it ASAP
I'll try it ASAP
ASKER