End Google Ads 201810 - BS.net 01 --> Hi,

I have noticed a problem in windows programming that I am unable to solve. I have created a new thread which should run as a separate process. In this thread I continually update a counter so that I Can visually see if and when my thread is interrupted.

If I put a CComboBox control on my dialog my thread is momentarily interrupted when the CComboBox is clicked and the list drops down.

I have tried creating my thread with realtime priority and the combobox still interrupts my thread when dropped down. Obviously the dropping down of the combobox does not interrupt other applications that are running in separate processes so I do not understand why it would interrupt my thread.

unsigned threadID;
HANDLE hThread = (HANDLE)_beginthreadex( NULL, 0, &UpdateThread, (void*)this, 0, &threadID );
SetPriorityClass(hThread, HIGH_PRIORITY_CLASS);
SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL);

How can I create a thread that will not be interrupted by the dropping down of the combobox?


Thanks,
Greg