Hi,
I'm trying to create a thread (never did before) to constantly look at a
combo box value but my thread take 100% of the processor, a thing I don't
want to. First is it normal and second if first is no what's my error in my
codes:
int test = 0;
{....}
HANDLE thread = createTriggerTh read((void*)HWn d);
if(NULL!=thread )
SetThreadPriori ty (thread, THREAD_PRIORITY _NORMAL);
{....}
HANDLE createTriggerTh read(void*pThis )
{
return ::CreateThread( NULL,0,(unsigne d long (__stdcall*)
(void*))Trigger Thread,(void *)pThis,0,NULL) ;
}
void TriggerThread(v oid*pThis)
{
do
{
test++;
} while(1);
}
What am I doing wrong????
Thanks,
Max.
I'm trying to create a thread (never did before) to constantly look at a
combo box value but my thread take 100% of the processor, a thing I don't
want to. First is it normal and second if first is no what's my error in my
codes:
int test = 0;
{....}
HANDLE thread = createTriggerTh read((void*)HWn d);
if(NULL!=thread )
SetThreadPriori ty (thread, THREAD_PRIORITY _NORMAL);
{....}
HANDLE createTriggerTh read(void*pThis )
{
return ::CreateThread( NULL,0,(unsigne d long (__stdcall*)
(void*))Trigger Thread,(void *)pThis,0,NULL) ;
}
void TriggerThread(v oid*pThis)
{
do
{
test++;
} while(1);
}
What am I doing wrong????
Thanks,
Max.
Comment