HeaderPane
Main
Hide
Share Link
Print

ItemShown

Defines an item's visibility status.

C

BOOL WINAPI SftBox_GetItemShown(HWND hwndCtl, int itemIndex);
BOOL WINAPI SftBox_SetItemShown(HWND hwndCtl, int itemIndex, BOOL fShown);

C++

BOOL CSftBox::GetItemShown(int itemIndex) const;
BOOL CSftBox::SetItemShown(int itemIndex, BOOL fShown);

Parameters

hwndCtl

The window handle of the combo box control.

itemIndex

The zero-based index of the item for which the visibility status is to be retrieved or set.

fShown

Set to TRUE to make the item visible. An item is made visible by expanding all its parent items. Set to FALSE to hide the item. An item is hidden by collapsing its immediate parent item.

Returns

GetItemShown returns a value indicating the current visibility status of the specified item, TRUE if the item is visible (all its parent items are expanded), FALSE if the item is not visible (a parent item is collapsed) or if the specified item doesn't exist.

SetItemShown returns TRUE if the function was successful, otherwise FALSE is returned.

Comments

The GetItemShown and SetItemShown functions define an item's visibility status.

An item's visibility status can be retrieved using GetItemShown. Even if an item is considered "visible", it may not actually be shown, because it doesn't fall inside the area of items currently shown in the dropdown portion. Use MakeRowVisible to scroll the item into view.

Items without parent items (level 0) cannot be hidden. They always remain visible.

GetNextShown and GetPrevShown can be used to retrieve the next or previous visible item.

In a combo box using a virtual data source, SetItemShown cannot be used and an error is returned.

See Also C/C++ API | Categories | Notifications


Last Updated 11/21/2026 - (email)
© 2026 Softel vdm, Inc.