title: How to show a TPopupMenu when you click a TButton?
body: <p>I want to show a popupmenu when click a button, but this procedure has error in Delphi XE.</p>
  
  <pre><code>procedure ShowPopupMenuEx(var mb1:TMouseButton;var X:integer;var Y:integer;var pPopUP:TPopupMenu);
  var
    popupPoint : TPoint;
  begin
    if (mb1 = mbLeft) then begin
      popupPoint.X := x ;
      popupPoint.Y := y ;
      popupPoint := ClientToScreen(popupPoint);   //Error Here
      pPopUP.Popup(popupPoint.X, popupPoint.Y) ;   
    end;
  end;
  
  procedure TForm1.Button1MouseUp(Sender: TObject; Button: TMouseButton;Shift: TShiftState; X, Y: Integer);
  begin
    ShowPopupMenuEx(button,Button1.Left,Button1.Top,PopupMenu1); //Error Here
  end;
  </code></pre>
  
  <p>when click button show this error :</p>
  
  <blockquote>
    <p>[DCC Error] Form1.pas(205): E2010 Incompatible types: 'HWND' and 'TPoint'<br>
    [DCC Error] Form1.pas(398): E2197 Constant object cannot be passed as var parameter<br>
    [DCC Error] Form1.pas(398): E2197 Constant object cannot be passed as var parameter</p>
  </blockquote>
  
  <p>Is there any better way for show popupmenu, when click a button?</p>