There is a code

procedure TChartEx.WMNCHitTest(var Msg: TWMNCHitTest); begin inherited; if (GetAsyncKeyState(VK_LBUTTON) = 0)then Msg.Result := HTTRANSPARENT; end; 

This is a schedule message handler (TChart) If my left mouse button is not pressed, then I skip the message to the parent. If pressed, the component does its work, but the context menu does not appear. How to handle this message correctly so that the context menu appears?

  • here meant corrected the text of the question. the previous reader did not understand the wording. The question is open - gregor
  • So the context menu is called when you click the right button. Try, if the right button is pressed, to return HTCLIENT. Or I also do not understand the question? - kami

0