- m_id = ::SetTimer(
- wxTimerHiddenWindowModule::GetHWND(), // window to send the messages to
- GetId(), // timer ID
- (UINT)m_milli, // delay
- NULL // timer proc. Not used since we pass hwnd
- );
-
- if ( !m_id )
+ m_id = GetNewTimerId(this);
+ // SetTimer() normally returns just idTimer but this might change in the
+ // future so use its return value to be safe
+ UINT_PTR ret = ::SetTimer
+ (
+ wxTimerHiddenWindowModule::GetHWND(), // window for WM_TIMER
+ m_id, // timer ID to create
+ (UINT)m_milli, // delay
+ NULL // timer proc (unused)
+ );
+
+ if ( ret == 0 )