class myThread{public: myThread() { } virtual ~myThread() { } void run() { AfxBeginThread(HelloWindows95,NULL, NULL, NULL, NULL, NULL); } };inline UINT HelloWindows95(LPVOID pParam){ PlaySound(_T("HELLOWIN.WAV"), NULL, SND_FILENAME); return 0;}
Just out of curiosity, is it possible to make the threadproc address "move" along as a new mythread object is created? As now HelloWindows95 is "pinned", if I
encapsulate HelloWindows95 into myThread (myThread::HelloWindows95), the proc would be 0xcccccccc at runtime, anyway I can wrap that around the class so that I could point to any proc i like which depends on the parameter passed in?
Thanks
Jack