wxDefButton is not a true wxWidgets class. It is actually identical to a wxButton, except that set_default_item() is called. The parent of a wxDefButton must be a wxPanel.