Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtPopupMenuWnd and CTreeCtrl problem Collapse All
Subject Author Date
Borremans Pierre Dec 3, 2009 - 3:24 AM

I use in my CTreeCtrl your CExtPopupMenuWnd. But when I use the parameters TPMX_DO_MESSAGE_LOOP in the trackpopupmenu, after doing a right click on a none selected item if i click on another item in my CTreeCtrl, the new item loose the focus.


How to resolve my problem ?

Technical Support Dec 7, 2009 - 4:39 AM

The CExtShellTreeCtrl::RefreshShellRoot() method allows you to specify any shell folder as root folder displayed in the CExtShellTreeCtrl control. It that what you need?

Technical Support Dec 7, 2009 - 4:39 AM

The tree view common control is specific. It does not send the standard WM_CONTEXTMENU message in all the cases. You should handle both the right mouse button click and context menu key pressing to display the context menu over the tree view common control. But the CExtTreeCtrl control fixes this and you should simply handle the standard WM_CONTEXTMENU message in your CExtTreeCtrl-derived class.

Borremans Pierre Dec 5, 2009 - 10:11 PM

The context menu is only invoke by using the mouse click on ctreectl’s items. If I use your ctreectl how to overdrive the context menu ? I try in your sample but without success ?

Borremans Pierre Dec 6, 2009 - 12:01 AM

ok it works on your sample but is it possible to use your CExtShellTreeCtrl not to display file on computer but for showing a personnal explorer where we create all items ?

Technical Support Dec 3, 2009 - 7:19 AM

If the menu is invoked by some mouse click, then it should appear without any menu item selected. If the menu is invoked using keyboard, then the first item from the top should be selected. This is the good style. We cannot confirm the TPMX_DO_MESSAGE_LOOP flag affects to the initial menu selection. The TPMX_SELECT_ANY flag is for that.