Using AfxBeginThread for multi-thread in VS C++

Summary Two tricks about multi-thread Controlling function must be global or static Multithreading must be enabled by the application Example AfxBeginThread function Code Example Reference Summary Create a separate thread as the worker thread, which can process time consuming task like printing, computation, etc., here I am using the new thread to process the interactive with the smart card, this mechanism can enable the application to response to user’s other action (requests to user interface), such as move the window, drag the scroll bar, etc.