
The find and replace common dialog boxes have a Find Next button that
Handling a Find
users can use while the dialog boxes are visible. Most applications also
Next command
support a Find Next command from the Search menu, so users can find the
next occurrence in one step instead of having to open the find dialog box
and press the Find Next button. TFindDialog and TReplaceDialog make it
easy for you to offer the same functionality.
Setting the FR_FINDNEXT flag has the same effect as pressing the Find
Next button:
void
TDatabaseWindow::CmEditFindNext()
{
SearchDialog->UpdateData();
SearchData.Flags |= FR_FINDNEXT;
DoSearch();
}
There are two printer common dialog boxes. The print job dialog box lets
Using printer
you choose what to print, where to print it, the print quality the number of,
common dialog
copies, and so on. The print setup dialog box lets you choose among the
boxes
installed printers on the system, the page orientation, and paper size and
source.
TP intDialog::TData’ members let you control the appearance and behaviorr s
of the printer common dialog boxes:
__________________________________________________________________________
Table 8.6
TData
member T pe Descriptiony
P inter commonr
____________________________________________________________________
dialog box TData
FromPage
int The first page of output, if the PD_PAGENUMS flag is specified.
data members
On input, it specifies the default first page. On output, it specifies
the first page the user chose.
T Page
int The last page of output, if the PD_PAGENUMS flag is specified.
o
On input, it specifies the default last page number On output, it.
specifies the last page number the user chose.
MinPage
int The fewest number of pages the user can choose.
MaxPage
int The largest number of pages the user can choose.
Copies
int The number of copies to print. On input, the default number of
copies. On output, the number of copies the user actually chose.
____________________________________________________________________
In the following example, CmFileP int executes a standard print jobr
common dialog box and uses the information in TP intDialog::TData tor
determine what to print. CmFileP intSetup adds a flag to bring up the printr
setup dialog box automatically.
194
OWL P ogrammer’ Guider s