AddLoadIcon Method (IMAGELIST)


9.2C, PLBCMP GUI Only

 

The AddLoadIcon method allows an icon resource to be loaded from a DLL or EXE module and stored into an IMAGELIST object. The method uses the following format:

 

[label]

{object}.AddLoadIcon

[GIVING {return} USING [*FileName]={filename}

 

 

[*ResourceId=]{resid}

 

Where:

label

Optional. A Program Execution Label.

object

Required. An IMAGELIST object to which the image is added.

return

Optional. A Numeric Variable that that receives the pass or fail result for the execution of the method.

filename

Required. A Character String Variable that identifies a DLL or EXE file to be accessed.

Resid

Required. A Numeric Variable or decimal value that is the resource identification number assigned to the icon resource in the DLL or EXE module.

Flags Affected: OVER, ZERO

Note the following:

  1. The ZERO flag is set when the {return} value is zero.

  2. The {return} value is zero when the method execution is successful. If the {return} value is non-zero, the AddLoadIcon method execution has failed.

  3. The OVER flag is set if the {return} variable is too small and the returned value is truncated.

  4. The following {return} values describe possible error codes that can be returned by the AddLoadIcon method:

  5.  

    Value

    Constant

    1

    The {filename} string is NULL.

    2

    The {filename} name can not be loaded.

    3

    Unable to load the icon from the {filename} module. The {resid} may not exist.

    4

    There was an error adding the icon image to the IMAGELIST object.

     

  6. For improved performance in the Application Server environment, do not specify the optional return value unless needed.

  7. This method is not supported by the PL/B Web Server.

 

 

See Also: Method Syntax, IMAGELIST Methods

 



PL/B Language Reference AddIcon Method (IMAGELIST) AddLoadImage (IMAGELIST)