WMDestroy函数调用inherited,难道是为了调用子类覆盖函数?还有这样调用的?

又碰到了:

procedure TWinControl.WMDestroy(var Message: TWMDestroy);
begin
  inherited; // important7 fixme 这里不是继承,也不是为了Dispatch,难道是为了调用子类覆盖函数?
  RemoveProp(FHandle, MakeIntAtom(ControlAtom));
  RemoveProp(FHandle, MakeIntAtom(WindowAtom));
end;

如果没有发现祖先的消息处理函数,会调用DefaultHandle函数,参考:

http://www.cnblogs.com/findumars/p/3703078.html

也不会调用子类覆盖函数(目的是为了向上,不是为了向下)。以后做个实验证实一下

原文地址:https://www.cnblogs.com/findumars/p/4743986.html