Defines an item's enabled/disabled status.
C
BOOL WINAPI SftBox_GetItemStatus(HWND hwndCtl, LONG indexTC); BOOL WINAPI SftBox_SetItemStatus(HWND hwndCtl, LONG indexTC, BOOL fEnable);
C++
BOOL CSftBox::GetItemStatus(LONG indexTC) const; BOOL CSftBox::SetItemStatus(LONG indexTC, BOOL fEnable);
hwndCtl
The window handle of the combo box control.
indexTC
The zero-based index of the item for which the enabled/disabled status is to be retrieved or set.
fEnable
Set to TRUE to enable the item, set to FALSE to disable the item.
GetItemStatus returns a value indicating the current enabled/disabled status of the specified item, TRUE if the item is enabled, FALSE if the item is disabled or if the specified item doesn't exist.
SetItemStatus returns TRUE if the function was successful, otherwise FALSE is returned.
The GetItemStatus and SetItemStatus functions define an item's enabled/disabled status.
If an item is disabled, it is drawn in a "grayed" manner indicating its status. Except for the visual difference, a disabled item is treated exactly like an enabled item. It is up to the application to implement a different behavior if an item is disabled.
It is possible to prevent a user from selecting disabled items using the fSelectEnabledItemsOnly member of the SFTBOX_CONTROL structure (see SetControlInfo).
In a combo box using a virtual data source, SetItemStatus cannot be used and an error is returned. The fEnabled member of the SFTBOX_ITEM structure is used instead.
See Also C/C++ API | Categories | Notifications