|Function||Initialize the global variables used by the plotting functions|
|Syntax C/C++||#include <Vgraph.h>
void V_initPlot( HWND vwindow, HDC vdc );
procedure V_initPlot( VPaintBox: TPaintBox );
|Description||vwindow is the handle for a window and vdc the handle of a device context. As long as these handles remain valid, future plotting operations (like VF_xyAutoPlot) will be directed to the window specified by vwindow and use the fonts defined in the device context vdc. Be sure that vwindow and vdc are still valid when a plotting operation is performed; if in doubt, call V_initPlot again.
C++ Builder with OWL: The natural place to call V_initPlot is in the virtual element function Paint. Then, the handle of the actual window is made available as "HWindow" by OWL, and the device context is the same as passed as a parameter to Paint.
VPaintBox is the paint box into which you wish to get a VectorLib plot. All future VectorLib plotting operations are directed into this paint box, unless you call V_initPlot again, with a new paint box as parameter.
V_initPlot reserves the rightmost about 2/3 of the screen for following plotting operations, leaving one line empty at the top of the screen and a few lines at the bottom. To override this, call V_setPlotRegion after V_initPlot.
VectorLib Table of Contents OptiVec home