how to use the function of PgDrawILineCx ()

I want to draw a line in ptraw .when I press the button of a dialog
int PgDrawILineCx( void *dc, int x1, int y1, int x2, int y2 );
I don’t know what’s dc. I hava a try ABW_PtRaw1.but when I press the button, the whole program exit.
who can help me . Thanks!

PgDrawILine() work on the current draw context
PgDrawILineCx() work on the given context dc

Then use PgDrawILine instead. Draw context is a well documented concept in the online doc.

I have tried to use PgDrawILine, and the fisrt parameter I use the name of ptraw,that’s ABW_PtRaw1. but when the program is running ,I press a toolbar button then a dialog pops up. there is a OK button on the dialog, (when I press this ok button,I hope to draw line on the ptraw ) .but now when I press the OK ,the whole program exit. so I guess that 's the wrong of the use of the fisrt parameter .