WindowCenter

HC GUI programming Windows A-F WindowCenter
Window WindowCenterOnParent

WindowCenter window direction


Centres the window.

Parameters

direction: Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL or wxBOTH. It may also include wxCENTRE_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window. The flag wxCENTRE_FRAME is obsolete and should not be used any longer (it has no effect).

Remarks: If the window is a top level one (i.e. doesn't have a parent), it will be centered relative to the screen anyhow.

Reference:

Window WindowCenterOnParent