V_initPlot
FunctionInitialize the global variables used by the plotting functions
Syntax C/C++#include <Vgraph.h>
#ifdef _Windows
    void V_initPlot( HWND vwindow, HDC vdc );
#else
    void V_initPlot( int graphmode );
#endif
Pascal/Delphifor Delphi:
uses Vgraph;
procedure V_initPlot( VPaintBox: TPaintBox );

for Borland Pascal:
uses Vgraph;
{$ifdef Windows}
    procedure V_initPlot( vwindow:HWND; vdc:HDC );
{$else}
    procedure V_initPlot( graphmode:Integer );
{$endif}
Descriptionvwindow 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.

Delphi programs:
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.

Error handlingnone
Return valuenone
See alsoVF_xyAutoPlot,   V_findAxes,   V_drawAxes,   V_setPlotRegion,   V_initPrint

VectorLib Table of Contents  OptiVec home