Mega Code Archive

 
Categories / Delphi / Examples
 

Keypreview for mouse in popup menus

Question: I need to detect a right mouse press on a popup menu item. There is no OnMouseDown event handler for popupmenu items so I want to grab the mouse event in the same manner as a form KeyPreview. How can I do that? Answer: This is not easily possible. The problem with Windows menus is that they use their own message queue.