T
tnndusa
Unregistered / Unconfirmed
GUEST, unregistred user!
type<br> TAppHandler = class<br> public<br> class procedure MessageHandler(var Msg:TMsg;var Handled:boolean);<br> end;<br><br>class procedure TAppHandler.MessageHandler(var Msg: TMsg;var Handled: boolean);<br>begin<br> case Msg.wParam of<br> SC_MINIMIZE :<br> begin<br> //这里我要处理一些事情,如果是MDI子窗体就不管它<br> //问题是,MDI子窗体在普通状态时最小化不会执行这里的代码<br> //但把MDI子窗体最大化后,再最小化,就会执行这里的代码,而且<br> //Msg.hwnd是主窗体的句柄,我想就算MDI子窗体最大化后点最小化也不执行<br> end;<br> end;<br> Handled:=false;<br>end;<br><br>initialization<br> Application.OnMessage := TAppHandler.MessageHandler;<br><br>end.<br><br>我该怎么解决???