It's clearly a bug in wxWidgets, and it's even
more clear that what I stated is the truth. A child dialog should open over the parent, end of story.
Every dialog in wxWidgets calls this when it is created:
The centering bug lies in that code.
My code worked around that by calling:
which apparently works.
Note the following declarations from wxWidgets-2.6.2\include\wx\window.h:344
// the generic centre function - centers the window on parent by`
// default or on screen if it doesn't have parent or
// wxCENTER_ON_SCREEN flag is given
void Centre( int direction = wxBOTH );
void Center( int direction = wxBOTH ) { Centre(direction); }
// centre on screen (only works for top level windows)
void CentreOnScreen(int dir = wxBOTH) { Centre(dir | wxCENTER_ON_SCREEN); }
void CenterOnScreen(int dir = wxBOTH) { CentreOnScreen(dir); }
// centre with respect to the the parent window
void CentreOnParent(int dir = wxBOTH) { Centre(dir | wxCENTER_FRAME); }
void CenterOnParent(int dir = wxBOTH) { CentreOnParent(dir); }
The code for
Centre() that handles all of the above functionality is in wxWidgets-2.6.2\src\common\wincmn.cpp:394
I'll do a diff later of the file from the one in the wxWidgets trunk and see if any changes have been made to that code. Now I'm going bowling.