IASPowerListBox::CreateItem
This method adds an item to the power list box and retrieves an interface that can be used to interact with the item.
Syntax
HRESULT CreateItem( IASPowerListBoxItem **ppItem, long lItemId, long lType );
Parameters
- ppItem
- Pointer to a pointer to an interface, such as IASPowerListBoxEdit, that can be used to interact with the item directly.
- lItemId
- Long integer that contains the identifier of the item.
- lType
- Long integer that contains the item type. It is one of the following values:
- ASFC_PWRLB_TYPE_COMMAND
- Specifies a command.
- ASFC_PWRLB_TYPE_EDIT
- Specifies an edit box.
- ASFC_PWRLB_TYPE_STRINGSPINNER
- Specifies a string spinner.
- ASFC_PWRLB_TYPE_INTSPINNER
- Specifies an integer spinner.
Return Values
NOERROR indicates success. E_OUTOFMEMORY indicates that the system is out of memory.
Remarks
Use this method if you need to add an item to a Power List box and then interact with it. By using CreateItem, you do not have to call QueryInterface to get the necessary interface.
See Also
IASPowerListBox::Add