/////////////////////////////////////////////////////////////////////////////
-// Name: spinbutt.cpp
+// Name: src/os2/spinbutt.cpp
// Purpose: wxSpinButton
// Author: David Webster
// Modified by:
// Created: 10/15/99
-// RCS-ID: $Id$
// Copyright: (c) David Webster
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
,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;
if (nY < 0 )
nY = 0;
- long lSstyle = 0L;
-
- lSstyle = WS_VISIBLE |
- WS_TABSTOP |
- SPBS_MASTER | // We use only single field spin buttons
- SPBS_NUMERICONLY; // We default to numeric data
+ long lSstyle = WS_VISIBLE |
+ WS_TABSTOP |
+ SPBS_MASTER | // We use only single field spin buttons
+ SPBS_NUMERICONLY; // We default to numeric data
if (m_windowStyle & wxCLIP_SIBLINGS )
lSstyle |= WS_CLIPSIBLINGS;
vEvent.SetPosition(nVal);
vEvent.SetEventObject(this);
- return(GetEventHandler()->ProcessEvent(vEvent));
+ return(HandleWindowEvent(vEvent));
} // end of wxSpinButton::OS2OnScroll
bool wxSpinButton::OS2Command( WXUINT WXUNUSED(uCmd),