Subj : Re: Beginner help To : comp.programming.threads From : Scott McPhillips [MVP] Date : Tue Mar 01 2005 08:06 pm greyham433@hotmail.com wrote: > I'm trying to create a basic thread using AfxBeginThread() but it's > just not working and I'm pulling out my hair. Here's what I've got... > > //this is in my CSkimmerDlg somewhere to start the thread > AfxBeginThread(StartCommunication,0) > ... > UINT CSkimmerDlg::StartCommunication(LPVOID p) > {//code...} > --------------------------- > In my header file, I have... > public: > UINT StartCommunication(LPVOID); > > But when I try to compile, I get an error: > error C2665: 'AfxBeginThread' : none of the 2 overloads can convert > parameter 1 from type 'unsigned int (void *)' > > Anyone knows what gives? Thanks for your time. > Your StartCommunication is a class member function. That can't work: a C compatible function is required. One solution is to put it outside of any class. Another solution is to stick the word "static" in front of its declaration within the class h file. There is a busy thriving MFC newsgroup on the msnews.microsoft.com news server. -- Scott McPhillips [VC++ MVP] .