X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70a2c6562fcc7088076ab421419069ef50e4a7d3..27813df1f79323884ce5e3ec9a730f5d3da03f95:/src/os2/control.cpp diff --git a/src/os2/control.cpp b/src/os2/control.cpp index a7d56cb07d..a50497174d 100644 --- a/src/os2/control.cpp +++ b/src/os2/control.cpp @@ -105,10 +105,7 @@ bool wxControl::OS2CreateControl( ) { bool bWant3D = FALSE; - int nX = rPos.x == -1 ? 0 : rPos.x; - int nY = rPos.y == -1 ? 0 : rPos.y; - int nW = rSize.x == -1 ? 0 : rSize.x; - int nH = rSize.y == -1 ? 0 : rSize.y; + // // Doesn't do anything at all under OS/2 // @@ -120,7 +117,8 @@ bool wxControl::OS2CreateControl( // All controls should have these styles (wxWindows creates all controls // visible by default) // - dwStyle |= WS_VISIBLE; + if (m_isShown ) + dwStyle |= WS_VISIBLE; wxWindow* pParent = GetParent(); PSZ zClass; @@ -134,6 +132,8 @@ bool wxControl::OS2CreateControl( zClass = WC_STATIC; else if ((strcmp(zClassname, "BUTTON")) == 0) zClass = WC_BUTTON; + else if ((strcmp(zClassname, "NOTEBOOK")) == 0) + zClass = WC_NOTEBOOK; dwStyle |= WS_VISIBLE; m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle @@ -170,8 +170,11 @@ bool wxControl::OS2CreateControl( InheritAttributes(); SetXComp(0); SetYComp(0); - if (nW == 0 || nH == 0) - SetBestSize(rSize); + SetSize( rPos.x + ,rPos.y + ,rSize.x + ,rSize.y + ); return TRUE; } // end of wxControl::OS2CreateControl