CMFCShellTreeCtrl Class
The CMFCShellTreeCtrl class extends CTreeCtrl Class functionality by displaying a hierarchy of Shell items.
class CMFCShellTreeCtrl : public CTreeCtrl
Members
Public Methods
Name |
Description |
---|---|
Enables or disables the shortcut menu. |
|
Returns a combination of flags that are passed to IShellFolder::EnumObjects. |
|
Retrieves the path to an item. |
|
Returns a pointer to the CMFCShellListCtrl Class object that is used together with this CMFCShellTreeCtrl object to create an Explorer-like window. |
|
This member function is called by this window's parent window when it receives a notification message that applies to this window. (Overrides CWnd::OnChildNotify.) |
|
|
|
|
|
Refreshes and repaints the current CMFCShellTreeCtrl object. |
|
Selects the appropriate tree control item based on a supplied PIDL or string path. |
|
Sets flags to filter the tree context (similar to the flags used by IShellFolder::EnumObjects). |
|
Sets a relation between the current CMFCShellTreeCtrl object and a CMFCShellListCtrl object. |
Remarks
This class extends the CTreeCtrl class by enabling your program to include Windows Shell items in the tree. This class can be associated with a CMFCShellListCtrl object to create a complete Explorer window. Then, selecting an item in the tree will display a list of Windows Shell items in the associated list.
Inheritance Hierarchy
Requirements
Header: afxshelltreeCtrl.h
Example
The following example demonstrates how to create an object of the CMFCShellTreeCtrl class. This code snippet is part of the Explorer Sample: MFC Windows Explorer Application.
CMFCShellTreeCtrl m_wndShellTree;
...
// const int idTree = 1
CRect rectDummy (0, 0, 0, 0);
const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
TVS_LINESATROOT | TVS_HASBUTTONS;
// The this pointer points to CFolderBar class which extends the CDockablePane class
m_wndShellTree.Create (dwViewStyle, rectDummy, this, idTree);