, wxWindowID vId
, const wxString& rsTitle
, const wxPoint& rPos
-, const wxSize& rSize
+, const wxSize& rSizeOrig
, long lStyle
, const wxString& rsName
)
m_windowStyle = lStyle;
SetName(rsName);
m_windowId = vId == -1 ? NewControlId() : vId;
+
+ // always create a frame of some reasonable, even if arbitrary, size (at
+ // least for MSW compatibility)
+ wxSize rSize = rSizeOrig;
+ if ( rSize.x == -1 || rSize.y == -1 )
+ {
+ wxSize sizeDpy = wxGetDisplaySize();
+ if ( rSize.x == -1 )
+ rSize.x = sizeDpy.x / 3;
+ if ( rSize.y == -1 )
+ rSize.y = sizeDpy.y / 5;
+ }
+
wxTopLevelWindows.Append(this);
if (pParent)
pParent->AddChild(this);