Click to See Complete Forum and Search --> : User Interface Thread


Irish_GUI
March 4th, 2004, 06:35 AM
Hi,i am writing a web server for a college assignment

and

i have created a dialog based windows app using the appwizard.

i have 2 buttons start and stop

when start is pressed by the user,

the web server starts a thread,
but i am unable to press the stop button

as the thread of execution is running for the web server,

can someone tell me how to implement a UI thread,
i have found one example on codeproject.com but it is very confusing and bloated

cilu
March 4th, 2004, 09:49 AM
perhaps you have a THREAD_PRIORITY_TIME_CRITICAL or THREAD_PRIORITY_HIGHEST and this thread is taking all the cpu time, so the UI thread is Suspended all the time.

cvogt61457
March 4th, 2004, 10:10 AM
Can you post your project?

Reduce the code to the minimum level that still has the described
problem. Remove anything that you don't want to have distributed.
Make sure the problem is still in the reduced code.

Sam Hobbs
March 4th, 2004, 04:27 PM
What is the thread doing that requires it to be a GUI thread? You are probably correct that it needs to be, but it might help if we knew what it is doing.

How do you create the thread? Or perhaps it is more relevant to ask what the program does after the AfxBeginThread, assuming you are using AfxBeginThread to create the thread.

Andreas Masur
March 6th, 2004, 03:38 PM
[Moved thread]