X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7993e67c758d0321c3bf2a6cab2ee16c42c73eab..588b8b7037d2b1c736863c43952b4d3a05c6cf2f:/src/os2/slider.cpp diff --git a/src/os2/slider.cpp b/src/os2/slider.cpp index ecb5f09f45..b190205052 100644 --- a/src/os2/slider.cpp +++ b/src/os2/slider.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #endif #include "wx/slider.h" @@ -95,7 +96,7 @@ void wxSlider::AdjustSubControls( ,(LONG)nYOffset ,(LONG)nNewWidth ,(LONG)nValueHeight - ,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW + ,SWP_SIZE | SWP_MOVE ); } ::WinSetWindowPos( (HWND)m_hStaticMin @@ -104,7 +105,7 @@ void wxSlider::AdjustSubControls( ,(LONG)nYOffset ,(LONG)nMinLen ,(LONG)nCy - ,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW + ,SWP_SIZE | SWP_MOVE ); nXOffset += nWidth + nCx; @@ -219,6 +220,7 @@ bool wxSlider::Create( lWstyle = SS_TEXT|DT_LEFT|WS_VISIBLE; if (m_windowStyle & wxCLIP_SIBLINGS) lWstyle |= WS_CLIPSIBLINGS; + m_hStaticMin = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle ,WC_STATIC // Window class ,(PSZ)wxBuffer // Initial Text @@ -301,7 +303,13 @@ bool wxSlider::Create( m_hWnd = (WXHWND)hScrollBar; SubclassWin(GetHWND()); ::WinSetWindowText((HWND)m_hWnd, ""); - SetFont(pParent->GetFont()); + + wxFont* pTextFont = new wxFont( 10 + ,wxMODERN + ,wxNORMAL + ,wxNORMAL + ); + SetFont(*pTextFont); if (m_windowStyle & wxSL_LABELS) { // @@ -311,6 +319,7 @@ bool wxSlider::Create( lWstyle = SS_TEXT|DT_LEFT|WS_VISIBLE; if (m_windowStyle & wxCLIP_SIBLINGS) lMsStyle |= WS_CLIPSIBLINGS; + m_hStaticMax = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle ,WC_STATIC // Window class ,(PSZ)wxBuffer // Initial Text @@ -404,6 +413,7 @@ bool wxSlider::Create( ,(PVOID)&lColor ); SetValue(nValue); + delete pTextFont; return TRUE; } // end of wxSlider::Create