This function lets you create an image that is managed as a COM interface.
In practice, this function lets you provide a control in a Visual Adelia window created by including an ActiveX with an IDispatch interface pointer that supports the desired image.
The following formats are supported: bmp, cut, emf, eps, ico, gif, iff, jpg, jp2, mng, pcx, png, ppm, pgm, pbm, psp, tif, tga and wmf. With the Adelia Mobile runtime, the only formats allowed are: bmp, gif, jpg, png and ico.
The concept of transparency is not supported.
Context
Windows client.
Parameters
ALPHA(n) |
Enter |
FileName |
Directory and name of the file containing the image. |
POINTER *IDispatch |
Output |
pDispImg |
IDispatch interface pointer pointing to the image, or *NULL in case of failure. |
NUM_BIN_4 |
Output |
ReturnCode |
Return code for the operation: 0 : Operation completed successfully. -1 : The image could not be loaded (due to an unsupported format or incorrect file name or path). Other value: Unexpected system error. |
Example
FileName = 'c:\DirImg\MyBitmapFile.bmp'
pDispImg = *NULL
CALL_DLL 'VaToolBx.Dll' 'VaToolBxCreatePicture' FileName pDispImg ReturnCode