hi, all.
i create a window and another thread for a long time work. when the work thread is runing, i close the window, the work is still runing or stop?
thank you@!
Posted on 2005-02-08 22:31:45 by geegle
It depends on what you do for the WM_DESTROY or WM_CLOSE messages. If you PostQuitMessage, then the message loop will exit, and the process will end - which will end the second thread as well.
Posted on 2005-02-08 23:06:52 by tenkey
When you create a thread, close the returned ThreadHandle immediately to prevent a small memory leak at shutdown... terminating the main process will terminate all threads, but it won't release some thread-specific resources like the handle.
Posted on 2005-02-08 23:43:45 by Homer