- m_id = 0;
-}
-
-wxTimer::~wxTimer()
-{
- wxTimer::Stop();
-
- wxTimerList.DeleteObject(this);
-}
-
-bool wxTimer::Start(int milliseconds, bool oneShot)
-{
- (void)wxTimerBase::Start(milliseconds, oneShot);
-
- wxCHECK_MSG( m_milli > 0, FALSE, wxT("invalid value for timer timeour") );
-
- wxTimerList.DeleteObject(this);
-
-#ifdef __WXMICROWIN__
- m_id = SetTimer(NULL, (UINT)(m_id ? m_id : 1),
- (UINT)milliseconds, (TIMERPROC) wxTimerProc);
-#else
- TIMERPROC wxTimerProcInst = (TIMERPROC)
- MakeProcInstance((FARPROC)wxTimerProc, wxGetInstance());
-
- m_id = SetTimer(NULL, (UINT)(m_id ? m_id : 1),
- (UINT)milliseconds, wxTimerProcInst);
-#endif
-
- if ( m_id > 0 )
+ if ( !wxTimerImpl::Start(milliseconds, oneShot) )
+ return false;
+
+ m_id = ::SetTimer
+ (
+ NULL, // don't use window
+ 1, // id ignored with NULL hwnd anyhow
+ (UINT)m_milli, // delay
+ wxTimerProc // timer proc to call
+ );
+
+ if ( !m_id )