wxCanvas::SetBackground

void SetBackground(wxBrush *brush)

Sets the current background brush for the canvas, used for the pixels between dotted or dashed lines. The brush should not be deleted while being used by a canvas. All brushes are deleted automatically when the application terminates.

See also wxBrush.