Make sure you run the simulation in a thread separate from the UI thread.
1. Define a custom message.
2. On simulation start up, supply a HWND of your choice (typically your progress dialog) to the thread.
3. Use
PostMessage()[
^]from your thread to post simulation progress to the window in your UI thread.