i'm trying to create a thread in visual c++
i created a dialog project using Crecordview
in one of the buttons i'm trying to create and start a thread
i declare my thread globally my code is :
UINT thread( LPVOID nParam );//declare thread
.
.
.
void CRecordView::OnButtonFunction()
{
AfxBeginThread(thread,this);
}
UINT thread( LPVOID nParam )//definition
{
//some function here
return 0;
}
when i reach the onbuttonfunction it reads the line
AfxBeginThread(thread,this) but it never calls the thread?
i think i might have to create a CWindThread to run this but i'm not sure how? pls help!
i created a dialog project using Crecordview
in one of the buttons i'm trying to create and start a thread
i declare my thread globally my code is :
UINT thread( LPVOID nParam );//declare thread
.
.
.
void CRecordView::OnButtonFunction()
{
AfxBeginThread(thread,this);
}
UINT thread( LPVOID nParam )//definition
{
//some function here
return 0;
}
when i reach the onbuttonfunction it reads the line
AfxBeginThread(thread,this) but it never calls the thread?
i think i might have to create a CWindThread to run this but i'm not sure how? pls help!