Classes

Method XbpBitmap():load() Foundation

Loads a bitmap from a resource file linked to the executable file.

Syntax
:load( [<cDLLname>], <nID> ) --> lSuccess
Parameters
<cDLLname>
The optional parameter <cDLLname> specifies the name of a DLL file as a character expression. This is used if the bitmap is linked as a resource to a DLL file rather than to the EXE file. If <cDLLname>is not specified, the resource is loaded from the EXE file.
<nID>
<nID> specifies the numeric resource ID and must be included. This is the resource ID used to link the bitmap with the executable file.
Return

This method returns .T. (true) when the bitmap could be loaded, otherwise it returns .F. (false).

Description

The :load() method loads a bitmap linked as a resource to the executable file. The bitmap itself must have been declared in an RC file that is linked to the executable file using the resource compiler RC.EXE. Normally it is linked to the EXE file, but it can also be linked to a specified DLL file.

Windows uses the Windows Bitmap file format as the default image format. The numeric resource id assigned to <nId> must be the id of a BITMAP resource linked into the application. In order to load an image of another image format, the image must be defined as a user-defined resource (USERDEF type) and loaded using the LoadResource() function. The resulting binary string can then be assigned to the bitmap object via the :setBuffer() method.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.