#include "wx/toplevel.h"
#ifndef WX_PRECOMP
+ #include "wx/msw/missing.h"
#include "wx/app.h"
#include "wx/dialog.h"
#include "wx/string.h"
#include "wx/msw/wince/missing.h"
#endif
-#include "wx/msw/missing.h"
#include "wx/msw/winundef.h"
#include "wx/display.h"
const wxSize sz = IsAlwaysMaximized() ? wxDefaultSize : size;
+#ifndef __WXWINCE__
+ if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft )
+ exflags |= WS_EX_LAYOUTRTL;
+#endif
+
return MSWCreate(wxCanvasClassName, title, pos, sz, flags, exflags);
}
dlgTemplate->style |= WS_POPUP;
#ifndef __WXWINCE__
+ if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft )
+ {
+ dlgTemplate->dwExtendedStyle |= WS_EX_LAYOUTRTL;
+ }
+
// force 3D-look if necessary, it looks impossibly ugly otherwise
if ( style & (wxRESIZE_BORDER | wxCAPTION) )
dlgTemplate->style |= DS_MODALFRAME;
DoShowWindow(SW_RESTORE);
}
+void wxTopLevelWindowMSW::SetLayoutDirection(wxLayoutDirection dir)
+{
+ if ( dir == wxLayout_Default )
+ dir = wxTheApp->GetLayoutDirection();
+
+ if ( dir != wxLayout_Default )
+ wxTopLevelWindowBase::SetLayoutDirection(dir);
+}
+
// ----------------------------------------------------------------------------
// wxTopLevelWindowMSW fullscreen
// ----------------------------------------------------------------------------