// JP opened flex table

Click to See Complete Forum and Search --> : right-double-click needed to get the context menu in a treeview


Eyal Herlin
June 26th, 1998, 01:24 PM
hi,

i've got a simple explorer like app with a treeview on the left pane which uses

a class that inherits from CTreeView.

i added the pop-up menu component from visual studio's components gallery to

this class and compiled.

strangly the popup menu only shows up when i double-right-click or

do a drag move with the right button that ends over some item (and not an empty area).

got a clue?

btw i have these handlers:

OnCreate

OnGetDispInfo

OnSetDispInfo

and some other on_command and on_update_command_ui handlers

Luis Barreira
June 26th, 1998, 09:54 PM
I have also noticed that kind of behaviour from Tree Views. The way I found of making it act on a single click is to handle the TVN_RCLICK message and in my handler send a WM_CONTEXTMENU to the TreeView.

Neerka
June 30th, 1998, 11:09 PM
Handle the =NM_RCLICK event for right click in the view. It will bring up the context menu on a single click.

You can use the classwizard to override the event.

Jean-Claude Demosthenidy
July 3rd, 1998, 02:28 AM
I am using TrackPopupMenu and process commands in On PopUpCommand.

How do I enable/disable commands in the popup menu?

//JP added flex table