/****************************************************************************/
/* SftTree/DLL 7.0 - Tree Control for C/C++ */
/* SftTree/DLL 7.0 - Itanium Edition */
/* SftTree/DLL 7.0 - x64 Edition */
/* SftTree/DLL 7.0 - Windows Mobile Edition */
/* Copyright (C) 1995, 2012 Softel vdm, Inc. All Rights Reserved. */
/****************************************************************************/
// Sample classes so CSftTree and CSftTreeSplit can be used as a view
// in the same manner as MFC's CTreeView
class CSftTreeView : public CCtrlView
{
DECLARE_DYNCREATE(CSftTreeView)
public:
CSftTreeView::CSftTreeView() : CCtrlView(_T(SFTTREE_CLASS),
SFTTREESTYLE_NOTIFY | /* Notify parent window */
SFTTREESTYLE_LEFTBUTTONONLY | /* Only respond to left mouse button */
SFTTREESTYLE_SCROLL | /* Honor WS_H/VSCROLL */
SFTTREESTYLE_DISABLENOSCROLL | /* Disable scrollbars instead of hiding */
WS_HSCROLL | WS_VSCROLL | /* Vertical and horizontal scrollbars */
WS_VISIBLE | WS_CHILD) /* Visible, child window */
{
}
CSftTree& CSftTreeView::GetTreeCtrl() const
{ return *(CSftTree*)this; }
};
class CSftTreeSplitView : public CCtrlView
{
DECLARE_DYNCREATE(CSftTreeSplitView)
public:
CSftTreeSplitView::CSftTreeSplitView() : CCtrlView(_T(SFTTREESPLIT_CLASS),
SFTTREESTYLE_NOTIFY | /* Notify parent window */
SFTTREESTYLE_LEFTBUTTONONLY | /* Only respond to left mouse button */
SFTTREESTYLE_SCROLL | /* Honor WS_H/VSCROLL */
SFTTREESTYLE_DISABLENOSCROLL | /* Disable scrollbars instead of hiding */
WS_HSCROLL | WS_VSCROLL | /* Vertical and horizontal scrollbars */
WS_VISIBLE | WS_CHILD) /* Visible, child window */
{
}
CSftTreeSplit& CSftTreeSplitView::GetTreeCtrl() const
{ return *(CSftTreeSplit*)this; }
};
sample_cpp_treeview.htmlSftTreeDLL70_sample_cpp_treeview.htmlFeedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com