X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/937013e0fd914d4c42f9f5ec98da665986b93dfa..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/os2/spinctrl.cpp diff --git a/src/os2/spinctrl.cpp b/src/os2/spinctrl.cpp index 1777cda78b..2771654ab0 100644 --- a/src/os2/spinctrl.cpp +++ b/src/os2/spinctrl.cpp @@ -40,8 +40,6 @@ extern void wxAssociateWinWithHandle( HWND hWnd static WXFARPROC fnWndProcSpinCtrl = (WXFARPROC)NULL; wxArraySpins wxSpinCtrl::m_svAllSpins; -IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl) - BEGIN_EVENT_TABLE(wxSpinCtrl, wxSpinButton) EVT_CHAR(wxSpinCtrl::OnChar) EVT_SPIN(wxID_ANY, wxSpinCtrl::OnSpinChange) @@ -126,8 +124,11 @@ bool wxSpinCtrl::Create( wxWindow* pParent, 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; @@ -296,7 +297,7 @@ wxSpinCtrl* wxSpinCtrl::GetSpinForTextCtrl( // sanity check wxASSERT_MSG( pSpin->m_hWndBuddy == hWndBuddy, - _T("wxSpinCtrl has incorrect buddy HWND!") ); + wxT("wxSpinCtrl has incorrect buddy HWND!") ); return pSpin; } // end of wxSpinCtrl::GetSpinForTextCtrl