wxCanvas::SetPen

void SetPen(wxPen *pen)

Sets the current pen for the canvas. The pen is not copied, so you should not delete the pen unless the canvas pen has been set to another pen, or to NULL. Note that all pens and brushes are automatically deleted when the program is exited.

See also wxPen.