您的位置:首页 > 其它

WM_PARENTNOTIFY的作用(不完全)

2016-03-24 17:44 495 查看
VCL里源码如下:

procedure TWinControl.WMParentNotify(var Message: TWMParentNotify);
begin
with Message do
if (Event <> WM_CREATE) and (Event <> WM_DESTROY) or
not DoControlMsg(Message.ChildWnd, Message) then inherited;
end;

function DoControlMsg(ControlHandle: HWnd; var Message): Boolean;
var
Control: TWinControl;
begin
DoControlMsg := False;
Control := FindControl(ControlHandle);
if Control <> nil then
with TMessage(Message) do
begin
Result := Control.Perform(Msg + CN_BASE, WParam, LParam);
DoControlMsg := True;
end;
end;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: