Re: multi-thread problem
cdg wrote:
I believe your suggestions corrected the problems I was having with the
message maps and adding the code. However, I am still getting the one error
message. And no there is no overloaded function in the program. But I am
still not sure how to correctly write the cast for the "this" pointer. If
you could correctly write those statements it sure would help.
error C2660: 'Thread1' : function does not take 0 parameters
For this section of code:
UINT CThreadTestDlg::Thread1(LPVOID lParam)
{
CThreadTestDlg* pDlg = (CThreadTestDlg *)lParam;
pDlg->Thread1();
long Num = 123456789;
pDlg->PostMessage(UWM_THREAD_FINISHED, (WPARAM)0, (LPARAM)Num);
return 0;
}
The cast for the 'this' pointer is not related to the error.
Can you show us the function you are trying to call, and show us its
declaration in the header?
The error message implies that you are trying to call a function you
don't have. It looks like you need this line added to the class
declaration:
void Thread1();
And then, of course, you have to provide the function.
--
Scott McPhillips [VC++ MVP]