wxWindow::Centre

void Centre(int direction)

Centres the window. The parameter may be wxHORIZONTAL, wxVERTICAL or wxBOTH.

The actual behaviour depends on the derived window. For a frame or dialog box, centring is relative to the whole display. For a panel item, centring is relative to the panel.