procedure WMSYSCOMMAND(var Msg:TMessage);message WM_SYSCOMMAND;
begin
case msg.lParam of
WM_LBUTTONDOWN: //实现单击在最小化和还原之间转化
begin
//鼠标左键被按下
if tags=true then //如果现在的窗体是还原的话
begin
application.Minimize;
Fep_DummyFep_Frm.Hide;
end
else
begin
application.Restore;
Fep_DummyFep_Frm.SetFocus;
end;
end;
WM_LBUTTONUP:
begin
//释放鼠标左键
end;
wm_rbuttondown:
begin
//鼠标右键被按下
SetForegroundWindow(Fep_DummyFep_Frm.Handle);
Fep_DummyFep_Frm.Pop_Menu.Popup(pt.x,pt.y); //使弹出窗体在这出现
end
else//调用父类的WndProc方法处理其它消息
inherited;
end;
一个消息拦截的声是有及一个简单的处理