A panel device context is automatically created when a panel or dialog box is created. It can be retrieved from a panel with wxCanvas::GetDC or wxPanel::GetPanelDC and then drawn into. See wxDC for further information on device contexts.