Returns an item's sibling information.
C
LONG WINAPI SftBox_GetSibling(HWND hwndCtl, LONG indexTC, int type);
C++
LONG CSftBox::GetSibling(LONG indexTC, int type) const;
hwndCtl
The window handle of the combo box control.
indexTC
The zero-based index number of the item for which sibling item information is to be retrieved.
type
A value indicating the type of sibling item information to retrieve.
| SFTBOX_SIBLING_FIRST | Retrieve the index of the item's first sibling. |
| SFTBOX_SIBLING_LAST | Retrieve the index of the item's last sibling. |
| SFTBOX_SIBLING_PREV | Retrieve the index of the item's previous sibling. |
| SFTBOX_SIBLING_NEXT | Retrieve the index of the item's next sibling. |
The return value is the index of the requested sibling item or -1 if the specified item doesn't have a sibling of the specified type. -1 is also returned if indexTC or type is invalid.
The GetSibling function returns an item's sibling information.
Siblings are items at the same level with the same parent item. With SFTBOX_SIBLING_FIRST and SFTBOX_SIBLING_LAST, the item indexTC itself is returned if it is the first or last of its siblings.
In a combo box control using a virtual data source, all items are siblings: SFTBOX_SIBLING_FIRST returns 0, SFTBOX_SIBLING_LAST returns the index of the last item and SFTBOX_SIBLING_PREV and SFTBOX_SIBLING_NEXT return the adjacent items.
See Also C/C++ API | Categories | Notifications