procedure Tencfrm.WMSysCommand(var Message: TMessage);
begin
if Message.WParam = SC_CLOSE then bitbtn2.OnClick(self)
else inherited;
end;
什么意思吗。完全不知。
inherited??

解决方案 »

  1.   

    否则以原有的方式处理消息因为 Message 不只可能是 关闭消息,还有最小化,最大化等等 的消息,这里只截获关闭消息,并对其处理,其它的消息按其默认的处理方式进行
      

  2.   

    inherited
    去看delphi自带的help
      

  3.   

    if Message.WParam = SC_CLOSE then bitbtn2.OnClick(self) //如果消息是关闭那末     bitbtn2按下
    else inherited; //否则是其他的消息的话 按照以前默认的处理 你覆盖了原先的处理方式
                        所以想按原来的处理 就用inherited
      

  4.   

    duxin(小伍)说的对,支持
    up
      

  5.   

    inherited,是说如果上面的判断不成立,就调用对象的父窗口对消息的处理方法,这里用的wParam作为标记,可以看成是对消息的截获,从而完成自己的目的。
      

  6.   

    无言。都说了。inherited调用对象(Tencfrm)的父类(估计是TFORm吧)对消息的处理方法