An application sends a CB_SETITEMDATA message to set the value associated with the specified item in a combo box.
Syntax
To send this message, call the
SendMessage
function as follows.
|
lResult = SendMessage(
| // returns LRESULT in lResult
|
| (HWND) hWndControl,
| // handle to destination control
|
| (UINT) CB_SETITEMDATA,
| // message ID
|
| (WPARAM) wParam,
| // = (WPARAM) () wParam; |
| (LPARAM) lParam
| // = (LPARAM) (DWORD) lParam; |
|
);
| |
Parameters
- wParam
-
Specifies the item's zero-based index.
- lParam
-
Specifies the new value to be associated with the item.
Return Value
Remarks
If the specified item is in an owner-drawn combo box created without the CBS_HASSTRINGS style, this message replaces the value in the
lParam parameter of the CB_ADDSTRING or CB_INSERTSTRING message that added the item to the combo box.
Message Information
| Header | Declared in Winuser.h, include Windows.h |
|---|
| Minimum operating systems |
Windows 95, Windows NT 3.1 |
|---|
See Also