2.2.6.6.4 ComboBox::FindItemData

Description

Find the item with the given data.

Syntax

int FindItemData( DWORD dwData )

Parameters

dwData

Return

Returns the index of item with the given data.

Examples

EX1

#include <..\OriginLab\DialogEx.h>
 
#define IDC_COMBO1  1001
void ComboBox_FindItemData_ex1(Dialog& MyDlg)
{
	ComboBox  	cmbBox = MyDlg.GetItem(IDC_COMBO1);
	if( cmbBox )
	{
		DWORD 		dwData = 100;
		cmbBox.SetItemData(8, dwData);
		int nIndexFound = cmbBox.FindItemData(dwData);
		ASSERT(8 == nIndexFound);
	}
}

Remark

See Also

Header to Include

Control.h