在TWinControl的响应WM_NOTIFY的函数WMNotify 里 procedure TWinControl.WMNotify(var Message: TWMNotify); begin if not DoControlMsg(Message.NMHdr^.hWndFrom, Message) then inherited; end;其中 DoControlMsg这样 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; 所以这个消息就形成了CN_NOTIFY=CN_BASE+WM_NOTIFY
关于CN_XXX的消息到是不太清楚。
里
procedure TWinControl.WMNotify(var Message: TWMNotify);
begin
if not DoControlMsg(Message.NMHdr^.hWndFrom, Message) then inherited;
end;其中 DoControlMsg这样
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;
所以这个消息就形成了CN_NOTIFY=CN_BASE+WM_NOTIFY