title: Message handler method in Delphi ignores that it is "private"
body: <p>There are two classes: <code>TBaseClass</code> and <code>TDerivedClass</code>, both in separate units.</p>
  <p><strong>TBaseClass</strong></p>
  <pre><code>unit InhPriv.BaseClass;
  
  interface
  
  uses Vcl.Controls, Winapi.Windows, Winapi.Messages, InhPriv.Messages;
  
  type
    TBaseClass = class(TWinControl)
    strict private
      procedure TheMethod(var msg: TMessage); message WM_CUSTOM;
    end;
  
  implementation
  
  procedure TBaseClass.TheMethod(var msg: TMessage);
  begin
    MessageBox(0, 'TBaseClass.TheMethod', 'IhheritedPrivateTest', 0);
  end;
  
  end.
  </code></pre>
  <p><strong>TDerivedClass</strong></p>
  <pre><code>unit InhPriv.DerivedClass;
  
  interface
  
  uses InhPriv.BaseClass, Winapi.Windows, Winapi.Messages, InhPriv.Messages;
  
  type
    TDerivedClass = class(TBaseClass)
    public
      procedure TheMethod(var msg: TMessage); message WM_CUSTOM;
    end;
  
  implementation
  
  procedure TDerivedClass.TheMethod(var msg: TMessage);
  begin
    inherited; //TBaseClass.TheMethod gets called!!!
    MessageBox(0, 'TDerivedClass.TheMethod', 'IhheritedPrivateTest', 0);
  end;
  
  end.
  </code></pre>
  <p><strong>Host form</strong></p>
  <pre><code>TForm1 = class(TForm)
  //.......
  private
    c: TDerivedClass;
  //.......
  end;
  </code></pre>
  <p><code>WM_CUSTOM</code> is defined as <code>WM_USER + 1</code></p>
  <p><strong>Calling the method</strong></p>
  <p><em>Variant 1: Sending a message:</em></p>
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  begin
    SendMessage(c.Handle, WM_CUSTOM, 0, 0);
  end;
  </code></pre>
  <p>Output:</p>
  <blockquote>
  <p>TBaseClass.TheMethod<br>
  TDerivedClass.TheMethod</p>
  </blockquote>
  <p><em>Variant 2: Calling the method directly:</em></p>
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  var m: TMessage;
  begin
    c.TheMethod(m);
  end;
  </code></pre>
  <p>Output:</p>
  <blockquote>
  <p>TBaseClass.TheMethod<br>
  TDerivedClass.TheMethod</p>
  </blockquote>
  <p><strong>CPU window</strong></p>
  <p>It is a direct method call.</p>
  <pre><code>InhPriv.DerivedClass.pas.17: inherited; //TBaseClass.TheMethod gets called!!!
  005B4880 8B55F8           mov edx,[ebp-$08]
  005B4883 8B45FC           mov eax,[ebp-$04]
  005B4886 E87DFDFFFF       call TBaseClass.TheMethod
  </code></pre>
  <p><strong>Delphi documentation says:</strong></p>
  <p><em>When <strong>inherited</strong> has no identifier after it, it refers to the inherited method with the same name as the enclosing method or, if the enclosing method is a message handler, to the inherited message handler for the same message.</em></p>
  <p>So, no explicit word says that converting a method to a message handler makes Delphi compiler violate OOP principles.</p>
  <p>May I have missed some documentation?</p>