Page 1 of 1

the left-click menu

Posted: Sun Mar 27, 2005 8:53 pm
by number4
On windows there is a menu in most applications that comes up wherver your mouse is on a left click. I generally know how to detect the click and how to make a menu but I am unclear on how to do this exactly. It should be different options depeding on what frame is clicked on and whats in the frame etc.
I do see the one that appears with a txtcntrl.

Posted: Sun Mar 27, 2005 9:54 pm
by eco
I'm sure you mean Right-Click menu (called a context menu or popup menu). Basically all you have to do is capture right click mouse events for each from you want a context menu for. You then create your wxMenu in that event handler just like any other menu then call wxWindow::PopupMenu() to make it appear.

Posted: Sun Mar 27, 2005 11:37 pm
by number4
Thank you.
How did I end up thinking left click.