Your browser doesn't support JavaScript Common Dialog Box - Windows Programming

Common Dialog Box

The Common Dialog Box Library consists of a collection of functions for invoking standard dialog boxes for performing common tasks. There are standard Windows dialogs for opening and saving files, choosing a printer, finding and replacing text, setting font options, picking a colour, and using a help file. Using the common control dialog enables an application to maintain a look of consistency. The common dialog box library files are found in COMMDLG.H header file. To use these functions, the application must first initialise the fields of a structure and then pass a structure pointer to the function. When the user terminates the dialog box, control returns to the calling application with any relevant information passed back to the application via the dialog box structure.

For further reading https://docs.microsoft.com/en-us/windows/win32/dlgbox/dialog-box-types

The examples below demonstrate 3 common dialog boxes: text find and replace, the file open and save and colour select. 


Select Colour Common Dialog Box

The Select Colour Dialog Box displays a basic set of available colours in addition to allowing a user to create custom colours by specifying RGB values


File Open/Save Common Dialog Box 

The ‘Common File-Open/Save’ dialog offers a consistent way to deal with file management operations, using the standard dialog interface that Windows users should be familiar with.

The Open dialog box lets the user specify the drive, directory, and the name of a file or set of files to open.

The Save As dialog box lets the user specify the drive, directory, and name of a file to save.


Find Common Dialog Box

The Find and Replace Common Dialog Box displays a modeless dialog box that allows the user to specify a string to search for within a text document, as well as additional options for text editing