6.1. The Possibilities

There are a number of ways that you might use threads in your own programs. Here are some ideas:

  • If you create an MDI (Multiple Document Interface) application, it is often useful to assign a separate thread to each window. For example, in an MDI communications program that lets you connect to multiple hosts simultaneously via multiple modems, it simplifies things considerably if each window has its own thread that communicates with just one host.

  • In a program that takes a long time to refresh its display because of the complexity of the graphics involved (for example, a CAD/CAM program may have to draw 10,000 line segments to refresh the display in a complicated drawing), it is useful to create a separate thread to handle ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.