LoadResPicture Method
Applies To
fpSpread control
Description
Loads a picture from a resource.
Syntax
CPicture CSpreadSheet::LoadResPicture(long hInstance, LPCTSTR ResourceName, LPCTSTR ResourceType, long PictType);
fpSpread.LoadResPicture(ByVal hInstance As Long, ByVal ResourceName As String, ByVal ResourceType As String, ByVal PictType As PictureTypeConstants) As Picture
Parameters
The following parameters are available:
Parameter | Description | ||
---|---|---|---|
hInstance | Instance handle for the EXE or DLL containing the resource | ||
ResourceName | Name of the resource, or a string starting with "#" and followed by the numeric identifier for the resource (for example, "BEANY", "#102") | ||
ResourceType | Name of the section in the resource file containing the resource, or a string starting with "#" and followed by the numeric identifier for the section (for example, "BITMAP", or "#2" for bitmap, or "#3" for icon) | ||
PictType | Graphic type of file to load Can be one of the following: |
||
Constant | Value | Description | |
PictureTypeUnknown | 0 | The type is not known. The control tries to load the picture using each of the following types, if possible. | |
PictureTypeBMP | 1 | Windows Bitmap graphic | |
PictureTypeGIF | 2 | Graphics Interchange Format graphic | |
PictureTypeJPEG | 3 | Joint Photographic Experts Group graphic | |
PictureTypePNG | 4 | Portable Network Graphic graphic | |
PictureTypeICO | 5 | Windows Icon graphic | |
PictureTypeTIFF | 6 | Tagged Image File Format graphic | |
PictureTypeTGA | 7 | Truevision Targa graphic | |
PictureTypePCX | 8 | Paintbrush graphics file graphic | |
PictureTypeWBMP | 9 | Wireless Bitmap Format graphic | |
PictureTypeWMF | 10 | Windows Meta File graphic (also loads enhanced metafiles (EMF)) | |
PictureTypeJP2 | 11 | JPEG 2000 graphic | |
PictureTypeJPC | 12 | JPEG 2000 graphic | |
PictureTypePGX | 13 | JPEG-2000 verification model graphic | |
PictureTypePNM | 14 | Portable graphics graphic | |
PictureTypeRAS | 15 | Sun Raster Image graphic |
Remarks
Use this method to load a picture from a resource.
If you use this method with a picture cell type and there are multiple sheets, set the Sheet property to specify the sheet with which you want to work.
If you use a resource id instead of a resource string then pass a string formatted with the resource id number and use the # symbol in front of it.
Return Type
Picture in bitmap format
See Also
Sheet property
LoadPicture, LoadPictureBuffer, SavePicture, SavePictureBuffer methods
DLL Correspondence
SSLoadResPicture function