PictureResName

<< Click to Display Table of Contents >>

Navigation:  Picture Functions >

PictureResName

Previous pageReturn to chapter overviewNext page

[Not available in .NET, use PictureDIB]

The same as PictureResID(), but instead of a numeric ID the resource is identified by name. The image is taken from the resource of

the calling application, if hInstance = 0; or

a DLL, with hInstance = handle to the instance of the loaded DLL

method VpeCoord VPE.PictureResName(

VpeCoord Left,

VpeCoord Top,

VpeCoord Right,

VpeCoord Bottom,

long hInstance,

string ResourceName

)

VpeCoord Left, Top, Right, Bottom

position and dimensions

long hInstance

Instance-Handle (of type HINSTANCE)

string ResourceName

resource-name

Returns:

the bottom coordinate (y2) of the inserted image

Remarks:

From resources, VPE can only load BMP files, not JPEG, WMF, TIFF or any other file types.

If you create a VPE document file with images loaded from a resource, and the PIC_IN_FILE flag is NOT used, VPE stores the resource-link in document files. If you open such a document file with another application that does not contain these resources with same ID’s / names, then no images will be shown. Since DLL Instance-Handles change from load to load, VPE stores ALL images where hInstance is not null ALWAYS with the flag PIC_IN_FILE set automatically in the document files.

 

VPE offers several methods to attach an object's position to margins and relative to the position of previously inserted objects. In addition Text, Rich Text and Picture objects are able to compute their dimensions automatically depending on their visual content.
For details please see "Dynamic Positioning" in the Programmer's Manual.

 

See also:

"Pictures" in the Programmer's Manual