X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d44b24ee63543390aa28e1eb4ff162da4264838..24f932d22a085ce899b94c98578f475782c75bf6:/src/os2/gauge.cpp diff --git a/src/os2/gauge.cpp b/src/os2/gauge.cpp index 449788d6a3..e12f172304 100644 --- a/src/os2/gauge.cpp +++ b/src/os2/gauge.cpp @@ -14,6 +14,7 @@ #ifndef WX_PRECOMP #include "wx/defs.h" #include "wx/utils.h" +#include "wx/scrolwin.h" #endif #include "wx/os2/private.h" @@ -155,15 +156,6 @@ bool wxGauge::Create( if (m_windowStyle & wxCLIP_SIBLINGS) lMsStyle |= WS_CLIPSIBLINGS; - // - // If the parent is a scrolled window the controls must - // have this style or they will overlap the scrollbars - // - if (pParent) - if (pParent->IsKindOf(CLASSINFO(wxScrolledWindow)) || - pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow))) - lMsStyle |= WS_CLIPSIBLINGS; - m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle ,WC_ENTRYFIELD // Window class ,(PSZ)NULL // Initial Text @@ -184,7 +176,12 @@ bool wxGauge::Create( ::WinQueryWindowPos(m_hWnd, &vSwp); SetXComp(vSwp.x); SetYComp(vSwp.y); - SetFont(pParent->GetFont()); + wxFont* pTextFont = new wxFont( 10 + ,wxMODERN + ,wxNORMAL + ,wxNORMAL + ); + SetFont(*pTextFont); if (nWidth == -1L) nWidth = 50L; if (nHeight == -1L) @@ -195,6 +192,7 @@ bool wxGauge::Create( ,nHeight ); ::WinShowWindow((HWND)GetHWND(), TRUE); + delete pTextFont; return TRUE; } // end of wxGauge::Create