IASImageMenu::Add

This method adds an item and its associated image to the image menu.

Syntax

HRESULT Add( OLE_HANDLE hImage, OLE_HANDLE hImageMask, BSTR bstr, short wID, BOOL fBitmap );

Parameters

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.