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
Defines the type of an application-supplied owner-draw function, which is called whenever an object needs to be rendered.
typedef BOOL (CALLBACK* LPFNSFTTREE_OWNERDRAWPROC)( HWND hwnd, LPSFTTREE_OWNERDRAW lpInfo, SFTTREE_DWORD_PTR UserData);
hwnd
The window handle of the tree control.
lpInfo
A pointer to the SFTTREE_OWNERDRAW structure describing the action required and the object to render.
UserData
An application-specific value, as supplied in the SFTTREE_OWNERDRAWPARM structure.
The return value is TRUE if the owner-draw callback was successful, FALSE otherwise.
LPFNSFTTREE_OWNERDRAWPROC defines the type of an application-supplied owner-draw function, which is called whenever an object needs to be rendered.
An owner-draw function cannot modify the tree control attributes in any way.
SftTree_SetShowRowHeader(g_hwndTree, SFTTREE_ROWSTYLE_BUTTONCOUNT1);/* Row style */ SftTree_SetRowColHeaderText(g_hwndTree, TEXT("?"));/* Row/column header text */ SftTree_SetRowColHeaderStyle(g_hwndTree, ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */ SftTree_SetRowColHeaderPictureStyle(g_hwndTree, SFTTREE_BMP_RIGHT);/* Row/column picture alignment */ SftTree_SetCharSearchMode(g_hwndTree, SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */ /* Use an ownerdraw callback routine */ { SFTTREE_OWNERDRAWPARM Parm; /* Parameter list */ Parm.lpfnOwnerDrawProc = (LPFNSFTTREE_OWNERDRAWPROC) Tree_OwnerDrawCallback;/* User supplied drawing routine */ Parm.OwnerDrawUserData = (SFTTREE_DWORD_PTR)0;/* User supplied data */ SftTree_SetOwnerDrawCallback(g_hwndTree, &Parm); } /* Change the default colors */ { SFTTREE_COLORS Colors; SftTree_GetCtlColors(g_hwndTree, &Colors);/* Get current color settings */
m_Tree.SetShowRowHeader(SFTTREE_ROWSTYLE_BUTTONCOUNT1);/* Row style */ m_Tree.SetRowColHeaderText(_T("?")); /* Row/column header text */ m_Tree.SetRowColHeaderStyle(ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */ m_Tree.SetCharSearchMode(SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */ /* Use an ownerdraw callback routine */ { SFTTREE_OWNERDRAWPARM Parm; /* Parameter list */ Parm.lpfnOwnerDrawProc = (LPFNSFTTREE_OWNERDRAWPROC) CSampleView::OwnerDrawCallback;/* User supplied drawing routine */ Parm.OwnerDrawUserData = (SFTTREE_DWORD_PTR)this;/* User supplied data */ m_Tree.SetOwnerDrawCallback(&Parm); } /* Change the default colors */ { SFTTREE_COLORS Colors; m_Tree.GetCtlColors(&Colors); /* Get current color settings */ Colors.colorTreeLines = COLOR_3DDKSHADOW | 0x80000000L;/* Tree line color */
See Also C/C++ API | Categories | Notifications