/////////////////////////////////////////////////////////////////////////////
-// Name: spinbutt.cpp
+// Name: src/os2/spinbutt.cpp
// Purpose: wxSpinButton
// Author: David Webster
// Modified by:
,wxWindowOS2* pWin
);
-IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
-
#include "wx/os2/private.h"
// ============================================================================
// wxWin macros
// ----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
-
bool wxSpinButton::Create(
wxWindow* pParent
, wxWindowID vId
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;
vEvent.SetPosition(nVal);
vEvent.SetEventObject(this);
- return(GetEventHandler()->ProcessEvent(vEvent));
+ return(HandleWindowEvent(vEvent));
} // end of wxSpinButton::OS2OnScroll
bool wxSpinButton::OS2Command( WXUINT WXUNUSED(uCmd),