To disable the Selection radio button, set the PD_NOSELECTION flag. To disable the Pages radio button and its associated From and To edit controls, set the PD_NOPAGENUMS flag. If PD_PAGENUMS is set, the nFromPage and nToPage members of the PRINTDLG structure contain the starting and ending pages specified by the user. When PrintDlg returns TRUE, the function sets one of these flags to indicate the user's selections. Before calling PrintDlg, you can set one of the PD_ALLPAGES, PD_SELECTION, or PD_PAGENUMS flags to indicate which button is initially selected. The Print dialog box includes a Print Range group of radio buttons that indicate whether the user wants to print all pages, a range of pages, or only the selected text. You can determine the cause of an error by using the CommDlgExtendedError function to retrieve the extended error value. If the user cancels the Print dialog box or an error occurs, PrintDlg returns FALSE. You can use the information in these structures to create a device context or an information context for the selected printer. For example, the hDevMode and hDevNames members typically return global memory handles for and DEVNAMES structures. If the user clicks the OK button, PrintDlg returns TRUE and uses the PRINTDLG structure to return information about the user's selections. The following illustration shows a typical Print dialog box. You create and display a Print dialog box by initializing a PRINTDLG structure and passing the structure to the PrintDlg function. The property sheet can also have additional application-specific and driver-specific property pages following the General page. You can use the PrintDlgEx function to display a Print Property Sheet, which has a General page containing controls similar to the Print dialog box. ![]() ![]() For example, the user can specify the printer to use, the range of pages to print, and the number of copies. ![]() The Print dialog box lets the user select options for a particular print job.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |