RAD Studio |  |

The WndProc Method

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

    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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!