RAD Studio
ContentsIndex
PreviousUpNext
The WndProc Method

Note: This information is applicable when writing VCL components only.
Here is part of the WndProc method for TControl, for example:

procedure TControl.WndProc(var Message: TMessage);
begin
  .
  .
  .
  if (Message.Msg >= WM_MOUSEFIRST) and (Message.Msg <= WM_MOUSELAST) then
    if Dragging then                                         { handle dragging specially }
      DragMouseMsg(TWMMouse(Message))
    else
      .                                                          { handle others normally }
      .
      .
    end;
.                                                            { otherwise process normally }
.
.
end;
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!