]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/spinbutt.cpp
Fix splitting message into title in body in MSW wxProgressDialog.
[wxWidgets.git] / src / os2 / spinbutt.cpp
index c176baa1419049717574e1ef8a87c3fb69c2fa51..19ea7af58212bfbdfacbd96c12d517ed3a15587c 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        spinbutt.cpp
+// Name:        src/os2/spinbutt.cpp
 // Purpose:     wxSpinButton
 // Author:      David Webster
 // Modified by:
@@ -28,8 +28,6 @@ extern void  wxAssociateWinWithHandle( HWND         hWnd
                                       ,wxWindowOS2* pWin
                                      );
 
-IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
-
 #include "wx/os2/private.h"
 
 // ============================================================================
@@ -40,8 +38,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
 // wxWin macros
 // ----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
-
 bool wxSpinButton::Create(
   wxWindow*                         pParent
 , wxWindowID                        vId
@@ -63,8 +59,11 @@ bool wxSpinButton::Create(
         m_windowId = NewControlId();
     else
         m_windowId = vId;
-    m_backgroundColour = pParent->GetBackgroundColour();
-    m_foregroundColour = pParent->GetForegroundColour();
+    if (pParent)
+    {
+        m_backgroundColour = pParent->GetBackgroundColour();
+        m_foregroundColour = pParent->GetForegroundColour();
+    }
     SetName(rsName);
     SetParent(pParent);
     m_windowStyle      = lStyle;
@@ -194,7 +193,7 @@ bool wxSpinButton::OS2OnScroll( int    WXUNUSED(nOrientation),
 
     vEvent.SetPosition(nVal);
     vEvent.SetEventObject(this);
-    return(GetEventHandler()->ProcessEvent(vEvent));
+    return(HandleWindowEvent(vEvent));
 } // end of wxSpinButton::OS2OnScroll
 
 bool wxSpinButton::OS2Command( WXUINT WXUNUSED(uCmd),