#define _EXPORT _export
#endif
+// should probably be in wx/msw/private.h
+#ifdef __WXMICROWIN__
+ #define MakeProcInstance(proc, hinst) proc
+#endif
+
IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
// ============================================================================
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
+ m_id = ::SetTimer(NULL, (UINT)(m_id ? m_id : 1),
+ (UINT)m_milli, wxTimerProcInst);
if ( m_id > 0 )
{
{
if ( m_id )
{
- KillTimer(NULL, (UINT)m_id);
+ ::KillTimer(NULL, (UINT)m_id);
+
wxTimerList.DeleteObject(this);
}