PictureDIB

<< Click to Display Table of Contents >>

Navigation:  Picture Functions >

PictureDIB

Previous pageReturn to chapter overviewNext page

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 to 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.).

method VpeCoord VPE.PictureDIB(

VpeCoord Left,

VpeCoord Top,

VpeCoord Right,

VpeCoord Bottom,

IntPtr [long] hDIB

)

VpeCoord Left, Top, Right, Bottom

position and dimensions

IntPtr [long] hDIB

handle to DIB (of type HGLOBAL)

Returns:

the bottom coordinate (y2) of the inserted image

Remarks:

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.

 

PictureDIB() expects a handle for a memory block that was allocated with GlobalAlloc(). PictureDIB() 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