If you use Sleep() in your code, you will soon realize that your application "appears" to block. This is because the Sleep() function does not process the message pump, and due to this your application gives the appearance of "hanging" for some time.
http://www.codeguru.com/Cpp/W-P/system/thr...icle.php/c5711/