X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3bf7524f394af039efe196a186f7969cbabcc19..ba75c6bb8c85705aca6b46871e0fc6548f15a73d:/src/os2/control.cpp diff --git a/src/os2/control.cpp b/src/os2/control.cpp index d8c0373c11..d515341c84 100644 --- a/src/os2/control.cpp +++ b/src/os2/control.cpp @@ -99,24 +99,23 @@ bool wxControl::OS2CreateControl( , WXDWORD dwExstyle ) { - bool bWant3D = FALSE; - // // Doesn't do anything at all under OS/2 // if (dwExstyle == (WXDWORD)-1) { - dwExstyle = Determine3DEffects(WS_EX_CLIENTEDGE, &bWant3D); + dwExstyle = 0; + (void) OS2GetStyle(GetWindowStyle(), &dwExstyle); } // - // All controls should have these styles (wxWindows creates all controls + // All controls should have these styles (wxWidgets creates all controls // visible by default) // if (m_isShown ) dwStyle |= WS_VISIBLE; wxWindow* pParent = GetParent(); - PSZ zClass; + PSZ zClass = ""; if (!pParent) return FALSE; @@ -162,9 +161,14 @@ bool wxControl::OS2CreateControl( SubclassWin(m_hWnd); // - // Controls use the same font and colours as their parent dialog by default + // Controls use the same colours as their parent dialog by default // InheritAttributes(); + // + // All OS/2 ctrls use the small font + // + SetFont(*wxSMALL_FONT); + SetXComp(0); SetYComp(0); SetSize( rPos.x @@ -241,6 +245,15 @@ WXDWORD wxControl::OS2GetStyle( return dwStyle; } // end of wxControl::OS2GetStyle +void wxControl::SetLabel( + const wxString& rsLabel +) +{ + wxString sLabel = ::wxPMTextToLabel(rsLabel); + + ::WinSetWindowText(GetHwnd(), sLabel.c_str()); +} // end of wxControl::SetLabel + // --------------------------------------------------------------------------- // global functions // --------------------------------------------------------------------------- @@ -271,10 +284,10 @@ void wxFindMaxSize( if (nRight > pRect->xRight) pRect->xRight = nRight; - if (nTop < pRect->yTop) + if (nTop > pRect->yTop) pRect->yTop = nTop; - if (nBottom > pRect->yBottom) + if (nBottom < pRect->yBottom) pRect->yBottom = nBottom; } // end of wxFindMaxSize