X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b39dbf34b887a73c525da903d8599f4f6b7eb8f9..16d0c403faf0b6f64e4798479abfddf8a8090d79:/src/msw/slider95.cpp diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index da71dcdfda..34dcbf13ae 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "slider95.h" #endif @@ -37,7 +37,25 @@ #include #endif -IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) +#if wxUSE_EXTENDED_RTTI +IMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider95, wxControl,"wx/scrolbar.h") + +WX_BEGIN_PROPERTIES_TABLE(wxSlider95) + WX_PROPERTY( Value , int , SetValue, GetValue , 0) + WX_PROPERTY( Minimum , int , SetMin, GetMin, 0 ) + WX_PROPERTY( Maximum , int , SetMax, GetMax, 0 ) + WX_PROPERTY( PageSize , int , SetPageSize, GetLineSize, 1 ) + WX_PROPERTY( LineSize , int , SetLineSize, GetLineSize, 1 ) + WX_PROPERTY( ThumbLength , int , SetThumbLength, GetThumbLength, 1 ) +WX_END_PROPERTIES_TABLE() + +WX_BEGIN_HANDLERS_TABLE(wxSlider95) +WX_END_HANDLERS_TABLE() + +WX_CONSTRUCTOR_8( wxSlider95 , wxWindow* , Parent , wxWindowID , Id , int , Value , int , Minimum , int , Maximum , wxPoint , Position , wxSize , Size , long , WindowStyle ) +#else +IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl) +#endif // Slider wxSlider95::wxSlider95() @@ -98,7 +116,9 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, msStyle |= SS_CENTER; WXDWORD exStyle = 0; - msStyle |= MSWGetStyle(GetWindowStyle(), & exStyle) ; + long valueStyle = m_windowStyle & ~wxBORDER_MASK; + valueStyle |= wxBORDER_SUNKEN; + msStyle |= MSWGetStyle(valueStyle, & exStyle) ; m_staticValue = (WXHWND) CreateWindowEx ( @@ -153,7 +173,7 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, HWND scroll_bar = CreateWindowEx ( - exStyle, TRACKBAR_CLASS, wxT(""), + exStyle, TRACKBAR_CLASS, wxEmptyString, msStyle, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL @@ -172,7 +192,7 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, SubclassWin(GetHWND()); - ::SetWindowText((HWND) m_hWnd, wxT("")); + ::SetWindowText((HWND) m_hWnd, wxEmptyString); SetFont(parent->GetFont()); @@ -592,9 +612,13 @@ void wxSlider95::SetRange(int minValue, int maxValue) WXHBRUSH wxSlider95::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { +#ifndef __WXWINCE__ if ( nCtlColor == CTLCOLOR_SCROLLBAR ) return 0; - +#else + if ( nCtlColor != CTLCOLOR_STATIC ) + return 0; +#endif // Otherwise, it's a static return wxControl::OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam); }