- // create the event we use to quit the thread
- m_data.hEventQuit = CreateEvent(NULL, FALSE, FALSE, NULL);
- if ( !m_data.hEventQuit )
+ // create the event we use to quit the thread: using a manual event
+ // here avoids problems with missing the event if wxDialUpManagerMSW
+ // is created and destroyed immediately, before wxRasStatusWindowProc
+ // starts waiting on the event
+ m_data->hEventQuit = CreateEvent
+ (
+ NULL, // default security
+ TRUE, // manual event
+ FALSE, // initially non signalled
+ NULL // nameless
+ );
+ if ( !m_data->hEventQuit )