The usual way to do this is to provide a thread function (usually a static member function of your class) and to start a worker thread (since this seems to be an MFC app, with AfxBeginThread), passing the address of the thread function. However, this has been discussed countless times here in the forums - just do a search. Also see the following FAQs:Quote:
Originally Posted by JonnyPoet
Hoe to create a worker thread
How to use member functions as thread functions
