/****************************************************************************/
/* SftTree/DLL 6.5 - Tree Control for C/C++                                 */
/* SftTree/DLL 6.5 - Itanium Edition                                        */
/* SftTree/DLL 6.5 - x64 Edition                                            */
/* SftTree/DLL 6.5 - Windows Mobile Edition                                 */
/* Copyright (C) 1995, 2009  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; }
};

 


Feedback / comments / error reports for this topic
© 2009 - Softel vdm, Inc. - www.softelvdm.com