]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/scrolbar.cpp
Removed some unnecessary bitmaps; other minor changes
[wxWidgets.git] / src / msw / scrolbar.cpp
index d111e085639bde4a89a86b0b02eae46d6945c72b..bac5e67a093db4de70e7ac16f46220ad28a5f91a 100644 (file)
@@ -34,11 +34,11 @@ extern void wxFindMaxSize(HWND hwnd, RECT *rect);
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
 
-#if WXWIN_COMPATIBILITY
 BEGIN_EVENT_TABLE(wxScrollBar, wxControl)
+#if WXWIN_COMPATIBILITY
   EVT_SCROLL(wxScrollBar::OnScroll)
-END_EVENT_TABLE()
 #endif
+END_EVENT_TABLE()
 
 #endif
 
@@ -100,7 +100,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
     ::SetScrollPos(scroll_bar, SB_CTL, 0, FALSE);
     ShowWindow(scroll_bar, SW_SHOW);
 
-    SetFont(parent->GetFont());
+    SetFont(parent->GetFont());
 
     m_hWnd = (WXHWND)scroll_bar;
 
@@ -183,7 +183,7 @@ void wxScrollBar::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control)
         if (new_pos > maxPos)
             new_pos = maxPos;
 
-        SetValue(new_pos);
+        SetThumbPosition(new_pos);
         wxScrollEvent event(scrollEvent, m_windowId);
         event.SetPosition(new_pos);
         event.SetEventObject( this );
@@ -331,7 +331,7 @@ WXHBRUSH wxScrollBar::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
 
 void wxScrollBar::Command(wxCommandEvent& event)
 {
-    SetValue(event.m_commandInt);
+    SetThumbPosition(event.m_commandInt);
     ProcessCommand(event);
 }