   Threads in MFC - can you help a beginner?
  I created a simple MFC dialog application with an OpenGL display and a few standard slider controls to manipulate 3D objects. Now, I am working on adding sound synthesis to this project (I used the popular P.Cook's STK). However, when the sound generation loop runs (sending a few thousand samples directly to the sound port) the whole application must wait for it to finish. I need to be able to influence the sound generation real-time using the slider controls. I know this can be done using threads, but I am completely new to the subject. The few tutorials I found online have either been over my head, or provided source that did not compile correctly. Can I put the sound generation loop in a background (worker?) thread in some simple way? Or do I need to rewrite my whole program, putting the user interface in its own thread as well? Maybe someone can point me to a simple tuorial with good source code examples for using threads in MFC Apps?   