Windows Dev Center

ComboBox_FindItemData macro

Finds the first item in a combo box list that has the specified item data. You can use this macro or send the CB_FINDSTRING message explicitly.

Syntax


int ComboBox_FindItemData(
   HWND   hwndCtl,
   int    indexStart,
   LPARAM data
);

Parameters

hwndCtl

Type: HWND

A handle to the control.

indexStart

Type: int

The zero-based index of the item before the first item to be searched. When the search reaches the bottom of the list, it continues searching from the top of the list back to the item specified by the indexStart parameter. If indexStart is –1, the entire listis searched from the beginning.

data

Type: LPARAM

The data to find.

Return value

The index of the matching item, or CB_ERR if the search was unsuccessful.

Remarks

For more information, see CB_FINDSTRING.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Windowsx.h

 

 

Community Additions

ADD
Show:
© 2015 Microsoft