yantrak
January 12th, 2011, 06:49 AM
hi all,
following is a code snippet of my program having vc6 mfc sdi & formview as basic characteristics.
void CScada_thrdsView::dsp_cnt()
{
while (!exit_thrd)
{while(!nw_cnt) ;
sprintf(cstring,"%d",count);
m_val.InsertString((count-1),cstring);
UpdateData(FALSE);
` nw_cnt = 0;
}
}
a screen shot of the situation obtained on execution is attatched with this post.
from debugging i gather that this error is being caused due to the updatedata statement.
the function dsp_cnt is in form view but is being called from the worker thread.
i request for help in sorting out this error.
thnx
ashwani
following is a code snippet of my program having vc6 mfc sdi & formview as basic characteristics.
void CScada_thrdsView::dsp_cnt()
{
while (!exit_thrd)
{while(!nw_cnt) ;
sprintf(cstring,"%d",count);
m_val.InsertString((count-1),cstring);
UpdateData(FALSE);
` nw_cnt = 0;
}
}
a screen shot of the situation obtained on execution is attatched with this post.
from debugging i gather that this error is being caused due to the updatedata statement.
the function dsp_cnt is in form view but is being called from the worker thread.
i request for help in sorting out this error.
thnx
ashwani