VpePictureDIB

<< Click to Display Table of Contents >>

Navigation:  Picture Functions >

VpePictureDIB

Previous pageReturn to chapter overviewNext page

[Windows platform only]

Takes the image from a handle - you must not delete the global memory block, but keep it unlocked.  The flag PIC_IN_FILE is ALWAYS automatically set. Note, that this functions expects a handle of a DIB, not to a BITMAP.

This function was only implemented to give you all possibilities in hands. Never use it to work with resources, as they are managed much better by VPE with the PictureRes-functions (locking, unlocking, conversion, etc.).

VpeCoord VpePictureDIB(

VpeHandle hDoc,

VpeCoord x,

VpeCoord y,

VpeCoord x2,

VpeCoord y2,

HGLOBAL hDIB

)

VpeHandle hDoc

Document Handle

VpeCoord x, y, x2, y2

position and dimensions

HGLOBAL hDIB

handle of DIB

Returns:

the bottom coordinate (y2) of the inserted image

 

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.

 

VpePictureDIB() expects a handle for a memory block that was allocated with GlobalAlloc(). VpePictureDIB() creates a copy of the supplied memory block, so the calling application is responsible for freeing the DIB handle. BUT, if you supply an identical handle multiple times, VPE will not create additional copies, instead VPE will reference the initial copied memory.
In other words: VPE creates only ONE copy of the supplied memory, for one and the same handle.

 

See Also:

"Pictures" in the Programmer's Manual