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 tree control's attributes.
C
BOOL WINAPI SftTree_GetControlInfo(HWND hwndCtl, LPSFTTREE_CONTROL lpCtl); BOOL WINAPI SftTree_SetControlInfo(HWND hwndCtl, LPSFTTREE_CONTROL lpCtl); BOOL WINAPI SftTreeSplit_GetControlInfo(HWND hwndCtl, LPSFTTREE_CONTROL lpCtl); BOOL WINAPI SftTreeSplit_SetControlInfo(HWND hwndCtl, LPSFTTREE_CONTROL lpCtl);
C++
BOOL CSftTree::GetControlInfo(LPSFTTREE_CONTROL lpCtl) const; BOOL CSftTree::SetControlInfo(LPSFTTREE_CONTROL lpCtl); BOOL CSftTreeSplit::GetControlInfo(LPSFTTREE_CONTROL lpCtl) const; BOOL CSftTreeSplit::SetControlInfo(LPSFTTREE_CONTROL lpCtl);
hwndCtl
The window handle of the tree control.
lpColors
A pointer to a SFTTREE_CONTROL structure containing the tree control definitions. GetControlInfo uses this structure to return the current color settings. SetControlInfo uses the contents of this structure to define the new settings. The cbSize member of the SFTTREE_CONTROL structure must be initialized to the size of the structure (sizeof(SFTTREE_CONTROL)) before calling GetControlInfo.
The return value is TRUE if the function was successful, otherwise FALSE is returned.
The GetControlInfo and SetControlInfo functions define the tree control's attributes.
To modify a control's attributes, the GetControlInfo function is used to retrieve its current attributes. The SFTTREE_CONTROL structure can then be modified, setting the desired attributes. Finally, the control's attributes are updated by a call to the SetControlInfo function.
If the SetControlInfo function fails, the SFTTREE_CONTROL structure's errorValue member contains an error code, indicating which structure member has caused the failure.
SftTree_SetOpenEnded(g_hwndTree, FALSE);/* Last column width */ SftTree_SetShowHeaderButtons(g_hwndTree, TRUE);/* Show column header as buttons */ /* Define control attributes */ { SFTTREE_CONTROL CtrlInfo; memset(&CtrlInfo, 0, sizeof(SFTTREE_CONTROL)); CtrlInfo.cbSize = sizeof(SFTTREE_CONTROL); if (!SftTree_GetControlInfo(g_hwndTree, &CtrlInfo))/* Get current settings */ ; /* Error handling goes here */ // You need to create a images for at least the ButtonExpanded and ButtonCollapsed button state //Sft_SetPictureBitmap(&CtrlInfo.ButtonExpanded, a_bitmap_handle); //Sft_SetPictureBitmap(&CtrlInfo.ButtonCollapsed, a_bitmap_handle); if (SftTree_GetGDIPlusAvailable(g_hwndTree)) { // In this example, we are using GDI+ images.
m_Tree.SetOpenEnded(FALSE); /* Last column width */ m_Tree.SetShowHeaderButtons(TRUE); /* Show column header as buttons */ /* Define control attributes */ { SFTTREE_CONTROL CtrlInfo; memset(&CtrlInfo, 0, sizeof(SFTTREE_CONTROL)); CtrlInfo.cbSize = sizeof(SFTTREE_CONTROL); if (!m_Tree.GetControlInfo(&CtrlInfo))/* Get current settings */ _ASSERT(0); /* Error handling goes here */ // You need to create a images for at least the ButtonExpanded and ButtonCollapsed button state //Sft_SetPictureBitmap(&CtrlInfo.ButtonExpanded, a_bitmap_handle); //Sft_SetPictureBitmap(&CtrlInfo.ButtonCollapsed, a_bitmap_handle); if (m_Tree.GetGDIPlusAvailable()) { // In this example, we are using GDI+ images.
See Also C/C++ API | Categories | Notifications