Chapter 6: Dialog Boxes and Property Sheets

Chapter 4 demonstrated how controls can be used to create quite complex user interfaces. The problem with that example, though, was that CtlView also contains a fair amount of code to create and manage the controls, code that you won't find in most Windows applications. Most Windows applications don't manage their child controls manually. Instead, dialog boxes are used. Dialog boxes are windows that typically use a predefined window class and a different default window procedure. The combination of the window class and the default window procedure, along with a set of special dialog box creation functions, hides the complexity of creating and managing the control windows.Dialog boxes (sometimes simply referred to as dialogs) query data from the user or present data to the user—hence the term dialog box. A specialized form of dialog, named a property sheet, allows a program to display multiple but related dialog boxes in an overlapping style; each box or property sheet is equipped with an identifying tab. Property sheets are particularly valuable given the tiny screens associated with many Windows CE devices.Windows CE also supports a subset of the common dialog library available under Windows XP. Specifically, Windows CE supports versions of the common dialog boxes File Open, File Save, Color, and Print. These dialogs are somewhat different on Windows CE. They're reformatted for the smaller screens and aren't as extensible as their desktop counterparts.