rxwindowhook.wincontrol:=你想要截取消息的控件(如form1),然后在
rxwindowhook.aftermessage,beforemessage中处理你想要自己处理的消息。
rxwindowhook.active 决定是否激活消息截取。
for example:
begin
rxwindowhook1.wincontrol:=form1;
rxwindowhook1.aftermessage:=yourproc;
end;
procedure TForm1.yourproc(Sender: TObject;
var Msg: TMessage;
var Handled: Boolean);
begin
if msg.msg=WM_WINDOWPOSCHANGING then
begin
//your process message;
......
end;
end;