Click here to Skip to main content
13,900,891 members
Click here to Skip to main content
Add your own
alternative version


17 bookmarked
Posted 24 Aug 2007
Licenced CPOL

The Ultimate Toolbox Net Browse Tree Control

, 25 Aug 2007
Rate this:
Please Sign up or sign in to vote.
A network browse tree control from the Ultimate Toolbox

Visit the Ultimate Toolbox main page for an overview and configuration guide to the Ultimate Toolbox library.

Source code and project files for this sample can be found in the samples\gui\NetBrowse directory of the sample projects download.


The COXNetBrowseTree control class allows a user to select a certain type of resource up to a certain level (net - domain - server - disk, printer, other).

The class COXNetBrowseTree is derived from the MFC class CTreeCtrl. It uses the tree control to show a hierarchical view of the network resources. The control itself knows how to retrieve the network resource information to show it to the user.

All this is done automatically and only when the user requests this information. Because retrieving the network information for a particular resource may require some time, the information is only fetched when the user actually expands a branch of the tree.


  • Easy to use in your dialog (just subclass a tree control).
  • All standard notification messages are available (e.g. TVN_SELCHANGED).
  • Easily browse resources on the network.
  • Show a resource only up to a certain level: (net - domain - server - disks, printers, others).
  • Easily recognizable resource icons included.
  • Extra info for each resource is maintained (type, display type, local name, remote name, comment and provider).

The compiled HTML help documentation contains a complete class reference for COXNetBrowseTree.


Since COXNetBrowseTree is derived from CTreeCtrl, using it is as simple as subclassing a CComboBox member variable set by the Class Wizard by simply replacing the class name in the declaration in the AFX_DATA area of your CDialog derived class. Include the OXNetBrowseTree.cpp file in your project and:

#include <span class="code-string">"OXNetBrowseTree.h"</span>

class CNetBrowseDlg : public CDialog
// Data members -------------------------------------------------------------


    COXNetBrowseTree    m_wndNetBrowseTree;


Initial CodeProject release August 2007.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

The Ultimate Toolbox
Web Developer
Canada Canada
In January 2005, David Cunningham and Chris Maunder created, a new group dedicated to the continued development, support and growth of Dundas Software’s award winning line of MFC, C++ and ActiveX control products.

Ultimate Grid for MFC, Ultimate Toolbox for MFC, and Ultimate TCP/IP have been stalwarts of C++/MFC development for a decade. Thousands of developers have used these products to speed their time to market, improve the quality of their finished products, and enhance the reliability and flexibility of their software.
Group type: Organisation

459 members

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web06 | 2.8.190306.1 | Last Updated 25 Aug 2007
Article Copyright 2007 by The Ultimate Toolbox
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid