Visit Gigasoft's Web Site
ProEssentials v8 Help

Chapter 6: Background Image Generation

 

You can call PEcreate with a parent handle of zero. This will create a pure memory-based object with no Windows functionality. In other words, a Window is not created and no message handling or other event processing is available. You can use this memory object to set properties, pass data, and thus generate PNGs, metafiles and other output as desired. Also, you can later attach a Window to this object by calling PEcreate again and this time passing the currently returned handle as nObjectType and providing a valid parent handle.

 

The developer using the Wpf, WinForm, ActiveX or VCL interfaces can keep the ProEssentials object hidden and then use image export functions such as PEcopypngtofile or PEprintgraph. The Wpf, WinForm, ActiveX and VCL interfaces function as Windowless server components if theyre never forced visible. Technically, the WPF interfaces do not have a window handle, but they do piggy back upon the parent window to perform windowing tasks.

 

The function PEgetmeta can be used to retrieve a metafile handle of the objects current image. You can play this metafile into any Device Context (DC) as needed with the PEplaymetafile ProEssentials API call. Refer to printing sections within Chapter 2, 3, 4, and 5.