#include <stdio.h>
#include <wx/utils.h>
#include <wx/brush.h>
+#include <wx/scrolwin.h>
#endif
#include "wx/slider.h"
{
lMsStyle |= WS_VISIBLE | SS_TEXT | DT_VCENTER;
+ //
+ // 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_hStaticValue = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
,WC_STATIC // Window class
,(PSZ)NULL // Initial Text
lWstyle = SS_TEXT|DT_LEFT|WS_VISIBLE;
if (m_windowStyle & wxCLIP_SIBLINGS)
lWstyle |= 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)))
+ lWstyle |= WS_CLIPSIBLINGS;
+
m_hStaticMin = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
,WC_STATIC // Window class
,(PSZ)wxBuffer // Initial Text
else
lMsStyle |= SLS_PRIMARYSCALE2;
+ //
+ // 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_nPageSize = ((nMaxValue - nMinValue)/10);
vSlData.usScale1Increments = m_nPageSize;
vSlData.usScale2Increments = m_nPageSize;
m_hWnd = (WXHWND)hScrollBar;
SubclassWin(GetHWND());
::WinSetWindowText((HWND)m_hWnd, "");
- SetFont(pParent->GetFont());
+ SetFont(*wxSMALL_FONT);
if (m_windowStyle & wxSL_LABELS)
{
//
lWstyle = SS_TEXT|DT_LEFT|WS_VISIBLE;
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)))
+ lWstyle |= WS_CLIPSIBLINGS;
+
m_hStaticMax = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
,WC_STATIC // Window class
,(PSZ)wxBuffer // Initial Text
,sizeof(LONG)
,(PVOID)&lColor
);
+ lColor = (LONG)m_backgroundColour.GetPixel();
+ ::WinSetPresParam( m_hStaticMin
+ ,PP_BACKGROUNDCOLOR
+ ,sizeof(LONG)
+ ,(PVOID)&lColor
+ );
+ ::WinSetPresParam( m_hStaticMax
+ ,PP_BACKGROUNDCOLOR
+ ,sizeof(LONG)
+ ,(PVOID)&lColor
+ );
+ ::WinSetPresParam( m_hStaticValue
+ ,PP_BACKGROUNDCOLOR
+ ,sizeof(LONG)
+ ,(PVOID)&lColor
+ );
+ ::WinSetPresParam( m_hWnd
+ ,PP_BACKGROUNDCOLOR
+ ,sizeof(LONG)
+ ,(PVOID)&lColor
+ );
SetValue(nValue);
return TRUE;
} // end of wxSlider::Create