Yielding Control to Background Applications
Windows-based 16-bit applications should yield control at all times so that other programs, such as accessibility aids, can run in the background. If a program refuses to yield control, the user is unable to access the machine. You can avoid access problems by following these techniques:
- Avoid using system modal dialog boxes or windows. When a system-modal window is active, no background tasks are allowed to run. (This is true to a lesser extent for 16-bit applications running under Windows 95, although it is not a problem for those running under Windows NT.)
- Avoid using the PeekMessage function in tight loops without yielding.