This is a discussion on Using CTreeView with CDialogBar - Programmer ; I want to use a CTreeView object in a CDialogBar derived dialog to get a Tree View in a dockable window just like the Solution Explorer in MS Visual 2003. I have the CDialogBar window docking just as it should ...
I want to use a CTreeView object in a CDialogBar derived dialog to get a
Tree View in a dockable window just like the Solution Explorer in MS Visual
2003. I have the CDialogBar window docking just as it should using
After I got the CDialogBar derived window working I put a Tree Control in
the template used with this CDialogBar derived object. According to MS
documentation I do not need to use the Create() method for the Tree View
because it is created automatically when put in the template. But what
GetDlgItem() seems to return is a CTreeCtrl object because when what
GetDlgItem() returns is cast to a CTreeView object the Watch window shows
there are bad pointers. When it is cast to a CTreeCtrl there aren't any.
What I want is a CTreeView class object associated with the Tree View in the
template. Will it be necessary to remove the Tree View control from the
template, declare a member variable in the class I derived from CDialogBar
of Class CTreeView and then use the Create method?
The CTreeView's Create method includes a rectangle parameter. But MS
documentation says CTreeView will occupy the entire area of its parent
window. If this is true of what use is the rectangle parameter and why is it
The Class Wizard offers neither CTreeView or CTreeCtrl as a choice to
associate with the Tree View control in the template. I am using Visual
Studio 2003. Is this still true of Visual Studio 2005?