+ yNew = (heightParent - height)/2;
+
+ // controls are always centered on their parent because it doesn't make
+ // sense to centre them on the screen
+ if ( (direction & wxCENTER_FRAME) || wxDynamicCast(this, wxControl) )
+ {
+ // adjust to the parents client area origin
+ wxPoint posParent = parent->ClientToScreen(wxPoint(0, 0));