![]() |
|
#1
|
|||
|
|||
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? |
|
#2
|
||||
|
||||
Re: Threads in MFC - can you help a beginner?see if this article at codeproject.com may be helpful:
http://www.codeproject.com/threads/threads_and_mfc.asp let us know if it does, so that others will have a reference. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Threads in MFC - can you help a beginner?Its a very good article that I've already looked at, but I cannot compile the code that goes with it. Every time I try to compile I get a "Debug Assertion Failed" error message, and running the precompiled examples causes a windows "Illegal action" error to pop up.
|
Recent GIDBlog
US Elections and the ?Voter?s Responsibility? by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fibonacci with 'threads' | balusss | Java Forum | 0 | 19-Mar-2006 04:39 |
| Apache2 config issues | monev | Apache Web Server Forum | 2 | 28-Jun-2004 07:19 |
| [You Decide] - Do we allow NEW threads with a list of links to resources? | JdS | GIDForums™ | 24 | 07-Mar-2004 14:19 |
| Latest Search Engines indexing GIDForums threads / posts | JdS | GIDForums™ | 3 | 22-Apr-2003 00:29 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The