|
|
Site Map control
The control depicts a spanning tree. It's sort of the same
control that the Microsoft Visual InterDev 6.0 uses to design and maintain
the navigation structure for the Web site.
The control comes with a Microsoft Visual Basic 6 test example. You can download the control here. Known Bugs
The Source CodeThe control is written using the Microsoft ATL library's great support classes for ActiveX controls. A few WTL files are also utilized, just to wrap some of the Windows GDI objects.The "Bull's-Eye" control presented by Brent Rector & Chris Sells in the "ATL Internals" bible contains many hints and guidelines on how to write ActiveX controls. Some of the Site Map control's code and many of the ATL fixes are based on this book.
The drag'n'drop stuff is handled on a transparent child window, which
sits on top of the control.
This allows the d&d code to operate freely from the control's
device context. It uses the almost undocumented Window style
The tree is internally managed as a STL list. This makes it easy to present to the host application through a VB collection, but probably wasn't a good design decision since it frequently needs to be converted to a more tree-like data-structure.
The graph layout algorithm used is a simple one I found at a
German University web site. How very nice that they put their
white papers on the web.
Code Features
Source Code DependenciesMicrosoft Visual C++ 6.0Microsoft ATL Library Microsoft WTL 3.0 Library STL Container Library Installation Guide
Useful LinksGraph layout algorithmBook: ATL Internals by Brent Rector & Chris Sells My other Visual Basic components Download Files
|
![]() | OCX File (72 Kb) Source Code (63 Kb) |