There are several types of common dialog available in windows operating system.
Common dialogs are popup dialog windows available as components to take verious input parameters from users.
These are some functionalities common dialogs provide to users-
- Selecting a file name with path in graphical environment for opening or saving a file.
- Selecting a system font and size and other attributes with preview.
- Selecting a color value for graphical or multimedia application
- Printer selection for prining text or graphical output of the program
- Pagesetup of the program output.
- Find and or replace string and parameter input from user
These are built in dialog resources with their additional functionalities. Programmers need not to implement these from scratch but still can reuse these and extend the functionality in their application.
These dialogs can be invoked via Win32 API calls directly. However MFC wraps these inside meaningful classes to maintain object oriented approach.
Common dialog pictures
Common dialog Win32 APIs
Programmers need to include comdlg.h file in their C/C++ files and comdlg32.lib is the import library to include during link time.
- GetOpenFileName: File Open dialog
- GetSaveFileName: File Save dialog
- ChooseFont: Font choose dialog
- ChooseColor: Color picker dialog
- PageSetupDlg: Printer page setup dialog
- PrintDlg: Print dialog
- FindText: File text find dialog
- ReplaceText: File text replace dialog
Common dialog MFC classess
CCommonDialog is the base class for classes that encapsulate functionality of the Windows common dialogs.
afxdlgs.h is the header file to include in MFC application. Following are the class name of the dialog:
- CFileDialog: File Open/Save dialog
- CFontDialog: Font choose dialog
- CColorDialog: Color picker dialog
- CPageSetupDialog: Printer page setup dialog
- CPrintDialog: Print dialog
- CFindReplaceDialog: File find/replace dialog
You have viewed 1 page out of 109. Your VC++ learning is 0.00% complete. Login to check your learning progress.
Similar topics related to this section
Programming Windows, Fifth Edition (Developer Reference)
Programming Applications for Microsoft Windows (Microsoft Programming Series)
Programming Windows with MFC, Second Edition
Visual C++ Programming
Programming Microsoft Visual C++, Fifth Edition
| #1 webmaster Sun 27 Apr/2014 13:59:36(GMT) || 0 || 0|
We are pleased to inform you that a forum/blog has been incorporated with www.mybestnotes.co.in. You are welcomed to add your comments, requests, codes, solutions and feedback to it. Please login(if already a member) or signup(for free) to avail to this facility.
Your message goes here: