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
Searches a string and selects the matching item.
C
int SftTree_SelectStringColExact(HWND hwndCtl, int start, int realCol, LPCTSTR lpszString); int SftTree_SelectStringExact(HWND hwndCtl, int start, LPCTSTR lpszString); int WINAPI SftTree_SelectStringExact_A(HWND hwndCtl, int start, LPCSTR lpszString); int WINAPI SftTree_SelectStringExact_W(HWND hwndCtl, int start, LPCWSTR lpszString); int SftTreeSplit_SelectStringColExact(HWND hwndCtl, int start, int realCol, LPCTSTR lpszString); int SftTreeSplit_SelectStringExact(HWND hwndCtl, int start, LPCTSTR lpszString); int WINAPI SftTreeSplit_SelectStringExact_A(HWND hwndCtl, int start, LPCSTR lpszString); int WINAPI SftTreeSplit_SelectStringExact_W(HWND hwndCtl, int start, LPCWSTR lpszString);
C++
int CSftTree::SelectStringExact(int start, int realCol, LPCTSTR lpszString) const; int CSftTreeSplit::SelectStringExact(int start, int realCol, LPCTSTR lpszString) const;
hwndCtl
The window handle of the tree control.
start
The zero-based index of the item where the search for the specified string is to begin.
realCol
The zero-based column number to be searched.
lpszString
The string to be searched.
The return value is the zero-based index of the item where the string was found. -1 is returned if the string was not found or an error occurred.
The SelectStringExact function searches a string and selects the matching item.
The column text searched is based on the column specified using realCol or last defined using SetAccessColumn. Functions, which do not allow the realCol parameter, access the column last defined by SetAccessColumn or the last column referenced by a column specific function. The last column accessed can be retrieved using GetAccessColumn.
The string lpszString is compared to the value returned by GetText for each item starting at start. The search starts at the item described by start and is restricted to the column specified by realCol. If an item with exactly matching text is found, it is selected and its zero-based index is returned, otherwise -1 is returned.
Only one column can be searched at a time. The comparison of lpszString and the cell text is not case sensitive. If the cell text is identical to the string in lpszString, it is considered a match. To find a loose match for lpszString use FindString.
SearchString | Cell Text | Match | Comment |
---|---|---|---|
ABC | abc | Yes | Same string, case is ignored |
abc | abc123 | No | Not the same string |
abc | Thisabc | No | Not the same string |
abc | ab | No | Not the same string |
See Also C/C++ API | Categories | Notifications