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 index of the first displayed column.
C
int WINAPI SftTree_GetFirstDisplayColumn(HWND hwndCtl); int WINAPI SftTreeSplit_GetFirstDisplayColumn(HWND hwndCtl, BOOL fLeft);
C++
int CSftTree::GetFirstDisplayColumn() const; int CSftTreeSplit::GetFirstDisplayColumn(BOOL fLeft = TRUE) const;
hwndCtl
The window handle of the tree control.
fLeft
Set to TRUE to retrieve the column number of the first displayed column on the left side of a split tree control (the portion of the tree control containing the hierarchy). If FALSE is specified, the column number of the first displayed column on the right side is returned.
GetFirstDisplayColumn returns the zero-based display column number of the first displayed column.
The GetFirstDisplayColumn function returns the index of the first displayed column.
The first column with a width greater than 0 (see SFTTREE_COLUMN_EX) is considered the first displayed column. It is not necessarily displayed or visible if horizontal scrolling is in effect. A column can be made visible using MakeCellVisible or MakeColumnVisible.
The last displayed column can be determined using GetLastDisplayColumn.
While most other functions use real column numbers, GetFirstDisplayColumn returns the display column number of the first displayed column. The display column number can be translated to a real column number using GetRealColumn.
int dispCol, firstDispCol, lastDispCol; LPSFTTREE_COLUMN_EX lpCol; int nCols; int lastShown = SftTree_GetPrevShown(g_hwndTree, -1); // get general information about tree control and columns nCols = SftTree_GetColumnsEx(g_hwndTree, &lpCol);/* Get column attributes */ dispCol = SftTree_GetDisplayColumn(g_hwndTree, col); firstDispCol = SftTree_GetFirstDisplayColumn(g_hwndTree); lastDispCol = SftTree_GetLastDisplayColumn(g_hwndTree); if (vKey == VK_HOME && (vMask & SFTTREE_HANDLECTRL)) { // Control+Home index = 0; dispCol = firstDispCol; vKey = VK_RIGHT; // if index/dispCol can't be edited, search a cell in this direction: } else if (vKey == VK_END && (vMask & SFTTREE_HANDLECTRL)) { // Control+End
int dispCol, firstDispCol, lastDispCol; LPSFTTREE_COLUMN_EX lpCol; int nCols; int lastShown = m_Tree.GetPrevShown(-1); // get general information about tree control and columns nCols = m_Tree.GetColumns(&lpCol);/* Get column attributes */ dispCol = m_Tree.GetDisplayColumn(col); firstDispCol = m_Tree.GetFirstDisplayColumn(); lastDispCol = m_Tree.GetLastDisplayColumn(); if (vKey == VK_HOME && (vMask & SFTTREE_HANDLECTRL)) { // Control+Home index = 0; dispCol = firstDispCol; vKey = VK_RIGHT; // if index/dispCol can't be edited, search a cell in this direction: } else if (vKey == VK_END && (vMask & SFTTREE_HANDLECTRL)) { // Control+End
See Also C/C++ API | Categories | Notifications