导航:  Windows Controls Procedures > List Box Control > Wrappers >

ListBox_SetItemData

上一页返回章节概述下一页

描述

 

在列表框中设置与指定项关联的值.您可以使用此功能或发送LB_SETITEMDATA消息明确.

 

FreeBASIC 语法

#define ListBox_SetItemData(hwndCtl, index, data)

 

参数

hListBox

[in]处理ListBox控件.

index

[in]指定项的下标.如果这个值是-1,的index值适用于列表框中的所有项目.

 

Microsoft Windows 95/Windows 98/Windows Millennium Edition (Windows Me): The index parameter is limited to 16-bit values. This means list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size in bytes of the items in a list box is limited only by available memory.

data

[in]指定的值将与项目相关的.

 

返回值

 

如果发生错误,返回值是LB_ERR.

 

备注

 

如果项目是在一个所有者绘制的列表框创建无LBS_HASSTRINGS风格,此消息中包含的值pData替换参数的LB_ADDSTRINGLB_INSERTSTRING消息向列表框中添加项.

 

引用文件

 

WindowsX.bi