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 column number of the currently pressed column header button.
C
int WINAPI SftTree_GetHeaderButton(HWND hwndCtl); BOOL WINAPI SftTree_SetHeaderButton(HWND hwndCtl, int realCol); int WINAPI SftTreeSplit_GetHeaderButton(HWND hwndCtl); BOOL WINAPI SftTreeSplit_SetHeaderButton(HWND hwndCtl, int realCol);
C++
int CSftTree::GetHeaderButton() const; void CSftTree::SetHeaderButton(int realCol); int CSftTreeSplit::GetHeaderButton() const; void CSftTreeSplit::SetHeaderButton(int realCol);
hwndCtl
The window handle of the tree control.
realCol
The zero-based column number specifying which header button to set to the "down" state. This value can be -1, which causes all header buttons to go to their "up" state.
GetHeaderButton returns the zero-based column number of the column header button currently pressed down or -1 if no button is pressed down.
The GetHeaderButton and SetHeaderButton functions define the column number of the currently pressed column header button.
Only one column header button can be down at any one time. A column header button can be pressed by the user or under program control using SetHeaderButton. Once pressed, the new button will remain in its down state until another button is pressed or until SetHeaderButton sets a new (or no) button.
If the column title style is defined using SFTTREE_HEADER_UP, the header button automatically returns to its "up" position when clicked (see SFTTREE_COLUMN_EX).
break; case SFTTREEN_LBUTTONDOWN_CELLBMP: case SFTTREEN_LBUTTONDBLCLK_CELLBMP: ToggleCellPicture(g_hwndTree, SftTree_GetCaretIndex(g_hwndTree)); break; case SFTTREEN_LBUTTONDOWN_COLUMN_HEADER: case SFTTREEN_LBUTTONDBLCLK_COLUMN_HEADER: if (SftTree_GetHeaderButton(g_hwndTree) == 0) // sort column 0 SetSortDirection(g_hwndTree, !g_fAscending); break; } break; case IDM_EXIT: // Menu command, Exit
void CSampleView::OnToggleCellPicture() { ToggleCellPicture(m_Tree.GetCaretIndex()); } void CSampleView::OnSetSortDirection() { if (m_Tree.GetHeaderButton() == 0) // sort column 0 SetSortDirection(!m_fAscending); }
See Also C/C++ API | Categories | Notifications