I tried to create a CMessageBoxEx object in MFC InitInstance() and delete in ExitInstance().
First call was o.k., but in next calls the timer didn't run.
Solution seems to be simple:
In second constructor
m_nResult = 0;
before call TimedOutMessageBox().
I also removed the first thread like suggested.
Hope these changes work well in multithreaded applications.