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
Returns the number of items in the tree control.
C
int WINAPI SftTree_GetCount(HWND hwndCtl); int WINAPI SftTreeSplit_GetCount(HWND hwndCtl);
C++
int CSftTree::GetCount() const; int CSftTreeSplit::GetCount() const;
hwndCtl
The window handle of the tree control.
The return value is the number of items in the tree control.
The GetCount function returns the number of items in the tree control.
// check if header right-clicked - we don't show the context menu there SftTree_GetHeaderRect(hwndTree, -1, &rect); if (PtInRect(&rect, pt)) return; // check if an item cell right-clicked index = SftTree_CalcIndexFromPointEx(hwndTree, &pt); if (index >= 0 && index < SftTree_GetCount(hwndTree)) { // on an item ShowItemMenu(hwndParent, hwndTree, index, x, y); return; } } /*------------------------------------------------------------------------------*/ /* This sample code can be used to implement a sorting callback routine. */
// check if header right-clicked - we don't show the popup there m_Tree.GetHeaderRect(-1, &rect); if (PtInRect(&rect, ptTree)) return; // check if an item cell right-clicked index = m_Tree.CalcIndexFromPointEx(&ptTree); if (index >= 0 && index < m_Tree.GetCount()) { // on an item ShowItemMenu(index, pt); return; } }
See Also C/C++ API | Categories | Notifications