- if ( !wxWindowNative::Create(parent, id, pos, size,
- style | wxCLIP_CHILDREN,
- name) )
+ actualStyle |= wxCLIP_CHILDREN;
+
+ actualStyle &= ~wxVSCROLL;
+ actualStyle &= ~wxHSCROLL;
+
+#ifdef __WXMSW__
+ // without this, borders (non-client areas in general) are not repainted
+ // correctly when resizing; apparently, native NC areas are fully repainted
+ // even without this style by MSW, but wxUniv implements client area
+ // itself, so it doesn't work correctly for us
+ //
+ // FIXME: this is very expensive, we need to fix the (commented-out) code
+ // in OnSize() instead
+ actualStyle |= wxFULL_REPAINT_ON_RESIZE;
+#endif
+
+ if ( !wxWindowNative::Create(parent, id, pos, size, actualStyle, name) )
+ return false;
+
+ // Set full style again, including those we didn't want present
+ // when calling the base window Create().
+ wxWindowBase::SetWindowStyleFlag(style);
+
+ // if we allow or should always have a vertical scrollbar, make it
+ if ( style & wxVSCROLL || style & wxALWAYS_SHOW_SB )