This does NOT work under Windows. It works in other platforms, but not windows (as stated in the wxWindows manual).
So the question remains: is it possible to move a modal dialog under Windows?
Oops - I should have read the manual more closely, or tried it with a wxMessageDialog instead of a generic modal dialog. Looking at the MSWindows code for wxMessageDialog (msgdlg.cpp), I see that it is implemented in terms of the MSW *function* MessageBox, which seems to be the source of the limitation on specifying a position or moving the window.
However, it does work fine for an ordinary wxDialog, so you could get the same effect by writing your own subclass of wxDialog to show the message. Apart from getting the icon to look like the native one, that shouldn't be to difficult.
This does NOT work under Windows. It works in other platforms, but not windows (as stated in the wxWindows manual).
So the question remains: is it possible to move a modal dialog under Windows?
Oops - I should have read the manual more closely, or tried it with a wxMessageDialog instead of a generic modal dialog. Looking at the MSWindows code for wxMessageDialog (msgdlg.cpp), I see that it is implemented in terms of the MSW *function* MessageBox, which seems to be the source of the limitation on specifying a position or moving the window.
However, it does work fine for an ordinary wxDialog, so you could get the same effect by writing your own subclass of wxDialog to show the message. Apart from getting the icon to look like the native one, that shouldn't be to difficult.
So the question remains: is it possible to move a modal dialog under Windows?
Yes, but the standard "common dialogs" are not real wxDialogs, but just a wrapper around an API function, so you don't have as much control. If you need to position the wxMessageDialog then you will need to create your own generic version of it.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!