X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9c331ded69073da6d9b2cec4a12eb09e63347892..b82827dd43caa489eade15cc02edef7fb79e8c20:/src/msw/slider95.cpp diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 2197868d25..9047d9bd7c 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -22,6 +22,8 @@ #ifndef WX_PRECOMP #include +#include +#include #endif #ifdef __WIN95__ @@ -36,11 +38,11 @@ #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl) -#if WXWIN_COMPATIBILITY BEGIN_EVENT_TABLE(wxSlider95, wxControl) +#if WXWIN_COMPATIBILITY EVT_SCROLL(wxSlider95::OnScroll) -END_EVENT_TABLE() #endif +END_EVENT_TABLE() #endif @@ -68,8 +70,8 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, SetValidator(validator); if (parent) parent->AddChild(this); - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; + SetBackgroundColour(parent->GetBackgroundColour()) ; + SetForegroundColour(parent->GetForegroundColour()) ; m_staticValue = 0; m_staticMin = 0; @@ -156,7 +158,7 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, SetWindowText((HWND) m_hWnd, ""); - SetFont(* parent->GetFont()); + SetFont(parent->GetFont()); if ( m_windowStyle & wxSL_LABELS ) { @@ -168,20 +170,19 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, wxGetInstance(), NULL); - if (GetFont()) + if (GetFont().Ok()) { -// GetFont()->RealizeResource(); - if (GetFont()->GetResourceHandle()) + if (GetFont().GetResourceHandle()) { if ( m_staticMin ) SendMessage((HWND)m_staticMin,WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); + (WPARAM)GetFont().GetResourceHandle(),0L); if ( m_staticMax ) SendMessage((HWND)m_staticMax,WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); + (WPARAM)GetFont().GetResourceHandle(),0L); if (m_staticValue) SendMessage((HWND)m_staticValue,WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); + (WPARAM)GetFont().GetResourceHandle(),0L); } } } @@ -369,7 +370,7 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags) int cy; int cyf; - wxGetCharSize(GetHWND(), &cx, &cy,GetFont()); + wxGetCharSize(GetHWND(), &cx, &cy, & GetFont()); if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL) { @@ -378,12 +379,12 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags) int min_len = 0; GetWindowText((HWND) m_staticMin, buf, 300); - GetTextExtent(buf, &min_len, &cyf,NULL,NULL, GetFont()); + GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont()); int max_len = 0; GetWindowText((HWND) m_staticMax, buf, 300); - GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont()); + GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont()); if (m_staticValue) { int new_width = (int)(wxMax(min_len, max_len)); @@ -439,11 +440,11 @@ void wxSlider95::SetSize(int x, int y, int width, int height, int sizeFlags) { int min_len; GetWindowText((HWND) m_staticMin, buf, 300); - GetTextExtent(buf, &min_len, &cyf,NULL,NULL,GetFont()); + GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & GetFont()); int max_len; GetWindowText((HWND) m_staticMax, buf, 300); - GetTextExtent(buf, &max_len, &cyf,NULL,NULL, GetFont()); + GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & GetFont()); if (m_staticValue) {