- ::MoveWindow(GetHwnd(), x1, y1, width1, height1, FALSE);
+ // ::SetWindowLong(GWL_EXSTYLE) doesn't work for the dialogs, so try
+ // to take care of (at least some) extended style flags ourselves
+ if ( extendedStyle & WS_EX_TOPMOST )
+ {
+ if ( !::SetWindowPos(GetHwnd(), HWND_TOPMOST, 0, 0, 0, 0,
+ SWP_NOSIZE | SWP_NOMOVE) )
+ {
+ wxLogLastError(_T("SetWindowPos"));
+ }
+ }
+
+ // move the dialog to its initial position without forcing repainting
+ if ( !::MoveWindow(GetHwnd(), x1, y1, width1, height1, FALSE) )
+ {
+ wxLogLastError(_T("MoveWindow"));
+ }