hi

I am searching for a way to suspend the execution of a C/C++ program.. I know there is the Sleep function but that only stops the program for a specified number of seconds...

what i need is a function that suspends the flow of control. then i need to reactivate the flow through some event.
take for example message boxes.. in any language when you pop up a message box the flow of control freezes until the user clicks some button on the message box and then the program resumes.. i need to do something similar

is that possible? or do i have to think about threads and mutexes?because i'm trying to avoid that..

if you need more clarification please ask me.

thank you