This method allows a bitmapped imaged to be drawn on the control.
HRESULT put_Image ( OLE_HANDLE hImage, OLE_HANDLE hImageMask, long dx, long dy, long dxWidth, long dyHeight );
NOERROR indicates success. E_INVALIDARG indicates that the argument is invalid.
The image mask is an optional monochrome bitmap that specifies which areas of the image are transparent. It must be the same size as the image referred to by hImage. For every black pixel in the mask, the corresponding pixel from hImage is drawn. White pixels are not drawn, and define transparent areas in the image. This function is similar in operation to BitBlt.
Because of Automation, bitmapped image pointers are passed as OLE_HANDLE types. You can cast a handle to and from a bitmap.
This method automatically repaints the control with the new bitmap.
The following code example shows how to call put_Image:
hBmp = LoadBitmapResource(hInst, MAKEINTRESOURCE(IDB_HOUSE));
hBmpMask = LoadBitmapResource(hInst, MAKEINTRESOURCE(IDB_HOUSEMASK));
pLabel -> put_Image((OLE_HANDLE) hBmp, (OLE_HANDLE) hBmpMask, 0, 0, 16, 16);