SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Creates a tree control window and attaches it to the CSftTree or CSftTreeSplit object.
C++
BOOL CSftTree::Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID); BOOL CSftTree::CreateEx( DWORD dwExStyle, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID); BOOL CSftTreeSplit::Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID); BOOL CSftTreeSplit::CreateEx( DWORD dwExStyle, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
dwExStyle
Specifies the extended window style of the tree control.
dwStyle
Specifies the window style of the tree control.
rect
Specifies the tree control size and position. Can be either a CRect object or a RECT structure.
pParentWnd
Specifies the tree control's parent window.
nID
Specifies the tree's control ID.
The return value is TRUE if the function was successful, otherwise FALSE is returned.
The Create and CreateEx functions define a tree control window and attach it to the CSftTree or CSftTreeSplit object.
lpCell->flag |= SFTTREE_BMP_RIGHT;/* Cell picture alignment */ } if (col == 2 && (index % 5) == 0) {/* Randomly change colors */ lpCell->colorBg = 0x80000000 | COLOR_BTNFACE; lpCell->colorFg = 0x80000000 | COLOR_BTNTEXT; } } // (Optional) Create row header information m_WorkingItem.lpszRowHeader = NULL; /* Row header text (can be NULL) */ m_WorkingItem.lpRow = &rowInfo; /* Row header information (can be NULL) */ rowInfo.colorBg = rowInfo.colorFg = /* Row header colors */ rowInfo.colorBgSel = rowInfo.colorFgSel = SFTTREE_NOCOLOR; if ((index % 8) == 0) {/*randomly add bitmaps */ Sft_SetPictureBitmap(&rowInfo.RowPicture1, m_hRowBitmap);/* Row header picture */ rowInfo.flag = SFTTREE_BMP_LEFT; /* Row header picture alignment */
///////////////////////////////////////////////////////////////////////////// // CSampleView message handlers int CSampleView::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CView::OnCreate(lpCreateStruct) == -1) return -1; if (!m_Tree.CreateEx( WS_EX_CLIENTEDGE, 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 */
See Also C/C++ API | Categories | Notifications