Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-03

Call context menu in my component

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

AlexeyT

Hi. I try to call context menu inside ATSynEdit:

- DoContextMenu(...)- does nothing

- Perform(LM_CONTEXTMENU, 0, 0)- does nothing

- WMContextMenu() must work but I need TMessage param for it, how to get it?

Regards, Alexey

Reply by email

Vojtěch Čihák

Hi,
 
DoContextMenu(...) cannot work, this method only manages OnContextPopup event. Perform(LM_CONTEXTMENU, 0, 0) (or SendMessage or PostMessage) works here (Qt). Handle must have assigned PopupMenu and it needs correct parameters, not just (...,0, 0) which shows Popmenu in the top-left screen corner here.  
V.
 

Reply by email