IASImageMenu::InsertAt
This method inserts an item at a specified index.
Syntax
HRESULT InsertAt( long index, OLE_HANDLE hImage, OLE_HANDLE hImageMask, BSTR bstr, short wID, BOOL fBitmap );
Parameters
- index
- [in] Index where the item is to be inserted.
- hImage
- [in] Handle to the image to be added to the menu.
- hImageMask
- [in] Handle to the image mask. Masks are not needed for icons.
- bstr
- [in] Unicode string to be associated with the image.
- wID
- [in] User-defined item identifier.
- fBitmap
- [in] Boolean that is set to TRUE if the image is a bitmap, or to FALSE if it is an icon.
Return Values
NOERROR indicates success. E_INVALIDARG indicates that the argument is invalid. E_OUTOFMEMORY indicates that the device is out of memory.
Remarks
Images may be either bitmaps or icons. If the images are bitmaps, a mask must also be supplied.