{
// use it
m_parent = parent;
-
- // VZ: to make dialog behave properly we should reparent
- // the dialog for Windows as well - unfortunately,
- // following the docs for SetParent() results in this
- // code which plainly doesn't work
-#if 0
- long dwStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE);
- dwStyle &= ~WS_POPUP;
- dwStyle |= WS_CHILD;
- ::SetWindowLong(GetHwnd(), GWL_STYLE, dwStyle);
- ::SetParent(GetHwnd(), GetHwndOf(parent));
-#endif // 0
}
}
if ( !MSWCreateControl(windowClass, msStyle, pos, size, value) )
return FALSE;
+ SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
+
#if wxUSE_RICHEDIT
if (m_isRich)
{
{
parent = wxTheApp->GetTopWindow();
- // but don't use the window which is about to be destroyed as parent
- if ( parent->IsBeingDeleted() )
+ // but don't use the window which is currently hidden as then the
+ // dialog would be hidden as well
+ if ( parent && !parent->IsShown() )
{
parent = NULL;
}