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 column number of the column being resized.
C
int WINAPI SftTree_GetResizeColumn(HWND hwndCtl); int WINAPI SftTreeSplit_GetResizeColumn(HWND hwndCtl);
C++
int CSftTree::GetResizeColumn() const; int CSftTreeSplit::GetResizeColumn() const;
hwndCtl
The window handle of the tree control.
GetResizeColumn returns the zero-based column number of the column being affected by the current notification. If a split tree control is used, the return value can be -1 indicating that the splitter bar was used to resize the left and right panes or the splitter bar was double-clicked.
The GetResizeColumn function returns the column number of the column being resized.
GetResizeColumn can be used while processing a SFTTREEN_COLUMNSIZE or SFTTREEN_LBUTTONDBLCLK_COLUMNRES notification to determine whether the splitter bar or a column was affected by the current event.
case SFTTREEN_EXPANDALL: { // expand all int index; index = SftTree_GetExpandCollapseIndex(hwndCtl);/* Get item to expand/collapse */ SftTree_Expand(hwndCtl, index, TRUE, TRUE); break; } case SFTTREEN_LBUTTONDBLCLK_COLUMNRES: { /* Resize column optimally */ int realCol = SftTree_GetResizeColumn(g_hwndTree); if (realCol >= 0) { SftTree_MakeColumnOptimal(g_hwndTree, realCol);/* Make column width optimal */ SftTree_RecalcHorizontalExtent(g_hwndTree);/* Update horizontal scroll bar */ } break; } case SFTTREEN_SELCHANGE:
/* Respond to events as the user double-clicks on the */ /* column resizing area. The events handled here can be */ /* changed to suit your application. */ void CSampleView::OnLButtonDblClkColumnResize() { /* Resize column optimally */ int realCol = m_Tree.GetResizeColumn(); if (realCol >= 0) { m_Tree.MakeColumnOptimal(realCol);/* Make column width optimal */ m_Tree.RecalcHorizontalExtent(0, FALSE);/* Update horizontal scroll bar */ } } void CSampleView::OnSelChange() {
See Also C/C++ API | Categories | Notifications