#pragma hdrstop
#endif
+#if wxUSE_TIMER
+
#ifndef WX_PRECOMP
#include "wx/setup.h"
#include "wx/window.h"
#define _EXPORT _export
#endif
-#if !USE_SHARED_LIBRARY
- IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
+// should probably be in wx/msw/private.h
+#ifdef __WXMICROWIN__
+ #define MakeProcInstance(proc, hinst) proc
#endif
+IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
+
// ============================================================================
// implementation
// ============================================================================
// wxTimer class
// ----------------------------------------------------------------------------
-wxTimer::wxTimer()
+void wxTimer::Init()
{
m_id = 0;
}
wxCHECK_MSG( m_milli > 0, FALSE, wxT("invalid value for timer timeour") );
- wxTimerList.DeleteObject(this);
TIMERPROC wxTimerProcInst = (TIMERPROC)
MakeProcInstance((FARPROC)wxTimerProc, wxGetInstance());
- m_id = SetTimer(NULL, (UINT)(m_id ? m_id : 1),
- (UINT)milliseconds, wxTimerProcInst);
+ m_id = ::SetTimer(NULL, (UINT)(m_id ? m_id : 1),
+ (UINT)m_milli, wxTimerProcInst);
+
if ( m_id > 0 )
{
wxTimerList.Append(m_id, this);
{
if ( m_id )
{
- KillTimer(NULL, (UINT)m_id);
+ ::KillTimer(NULL, (UINT)m_id);
+
wxTimerList.DeleteObject(this);
}
return 0;
}
+
+#endif // wxUSE_TIMER