Common Dialog Boxes

A common dialog box is a system-defined dialog box that standardizes how users perform complex operations that are common to most applications. Windows CE supports the Color, Open, Save As and Print common dialog boxes. The following screen shot illustrates a Print dialog box.

Print common dialog box

Each of the common dialog boxes has a unique purpose. The Color dialog box provides a user with a way to select a color from a set of custom colors or from a set of basic colors that are determined by the display driver. The Open dialog box provides users with a way to select a file to open. The Save As dialog box provides users with a way to save a file under a name other than the name with which it was opened. The Print dialog box provides users with a way to select print job options. Users must print the entire document or the currently selected portion and can print only one copy at a time. The settings in the Print dialog box are always initialized to the current default printer. If the user has never used the Print dialog box before, the first printer registered in the registry is the default. After that, the last printer the user selected is the default.

Note You can set the widths and minimum widths of the left, top, right, and bottom margins of the printed page by including values for the rcMargin and rcMinMargin members of the PRINTDLG structure.

Common dialog boxes are centered vertically and horizontally on the screen and are not movable. They always have the Help button displayed.