Navigation:  Programmer's Reference >

Embedding your graph into a BPlus window

 

 

Previous pageReturn to chapter overviewNext page

lampe

Info: A detailed example for embedding a GRAPH-XT graph into a Basic Plus child window can be found in the Dplot_example12.prg example program, see SUB Dplot_bp_panel.

 

GRAPH-XT allows you to write the graph into any existing Basic Plus bitmap child widget within your Basic Plus window. This is helpful if you have existing Basic Plus applications and you would like to draw the GRAPH-XT graph inside your panel(s).

This function requires the use of the high color mode since we are working with Basic Plus widgets. You would then create your Panel and any widget within your panel as usual. Your panel should contain a Basic Plus bitmap child widget with the desired size and position. You can then pass the handle of this widget (e.g. @Bitmap1) to the GRAPH-XT function Dplot_show with special parameters:

CALL Dplot_show(Doc_num,"",1,0,0,0,0,@Bitmap1)

If you specify a value>1 for the Target variable AND a value of 0 (zero) for X0, Y0, W and H then GRAPH-XT will create a bitmap within the Basic Plus widget @Bitmap1 using the pre-defined size and position.

clip0091

Info3

Please note: It is important that you define the bitmap widget (@Bitmap1) and set up the position and size before you call the function Dplot_show. Otherwise you might not see any graphics on the screen.