• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 684
  • Last Modified:

Folder List, Browse Button

HI!
I need to create a button in MFC, that will open a Browse dialog like in Windows File-Finder(You know, that directory tree!)! How can I create that Directory tree?
0
Eran061997
Asked:
Eran061997
  • 2
1 Solution
 
jasiekCommented:
Hello:

Is it the answer you need?: (mcvs 5.0 online help):

CTreeCtrl vs. CTreeView

MFC provides two classes that encapsulate tree controls: CTreeCtrl and CTreeView. Each class is useful in different situations.

Use CTreeCtrl when you need a plain child window control; for instance, in a dialog box. You'd especially want to use CTreeCtrl if there will be other child controls in the window, as in a typical dialog box.

Use CTreeView when you want the tree control to act like a view window in document/view architecture as well as a tree control. A CTreeView will occupy the entire client area of a frame window or splitter window. It will be automatically resized when its parent window is resized, and it can process command messages from menus, accelerator keys, and toolbars. Since a tree control contains the data necessary to display the tree, the corresponding document object does not have to be complicated — you could even use CDocument as the document type in your document template.

See Also   Windows Common Controls and MFC Classes
0
 
shaigCommented:
The MFC has several standard window classes made for you,
one of them is the CFileDialog, i think it's what you want.


0
 
chensuCommented:
Eran:
Would you please explain to me why you rejected my answer?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now