Skip to content

Commit e453987

Browse files
author
mtx48109
committed
reformat mfc reference pr11
1 parent ab97683 commit e453987

32 files changed

+566
-566
lines changed

docs/mfc/reference/cprintdialogex-class.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ class CPrintDialogEx : public CCommonDialog
6161

6262
To use a `CPrintDialogEx` object, first create the object using the `CPrintDialogEx` constructor. Once the dialog box has been constructed, you can set or modify any values in the [m_pdex](#m_pdex) structure to initialize the values of the dialog box's controls. The `m_pdex` structure is of type [PRINTDLGEX](http://msdn.microsoft.com/library/windows/desktop/ms646844). For more information on this structure, see the Windows SDK.
6363

64-
If you do not supply your own handles in `m_pdex` for the **hDevMode** and **hDevNames** members, be sure to call the Windows function **GlobalFree** for these handles when you are done with the dialog box.
64+
If you do not supply your own handles in `m_pdex` for the `hDevMode` and `hDevNames` members, be sure to call the Windows function `GlobalFree` for these handles when you are done with the dialog box.
6565

6666
After initializing the dialog box controls, call the `DoModal` member function to display the dialog box and allow the user to select print options. When `DoModal` returns, you can determine whether the user selected the OK, Apply, or Cancel button.
6767

6868
If the user pressed OK, you can use `CPrintDialogEx`'s member functions to retrieve the information input by the user.
6969

7070
The `CPrintDialogEx::GetDefaults` member function is useful for retrieving the current printer defaults without displaying a dialog box. This method requires no user interaction.
7171

72-
You can use the Windows **CommDlgExtendedError** function to determine whether an error occurred during initialization of the dialog box and to learn more about the error. For more information on this function, see the Windows SDK.
72+
You can use the Windows `CommDlgExtendedError` function to determine whether an error occurred during initialization of the dialog box and to learn more about the error. For more information on this function, see the Windows SDK.
7373

7474
For more information on using `CPrintDialogEx`, see [Common Dialog Classes](../../mfc/common-dialog-classes.md).
7575

@@ -104,7 +104,7 @@ CPrintDialogEx(
104104

105105
### Parameters
106106
*dwFlags*
107-
One or more flags you can use to customize the settings of the dialog box, combined using the bitwise OR operator. For example, the **PD_ALLPAGES** flag sets the default print range to all pages of the document. See the [PRINTDLGEX](http://msdn.microsoft.com/library/windows/desktop/ms646844) structure in the Windows SDK for more information on these flags.
107+
One or more flags you can use to customize the settings of the dialog box, combined using the bitwise OR operator. For example, the PD_ALLPAGES flag sets the default print range to all pages of the document. See the [PRINTDLGEX](http://msdn.microsoft.com/library/windows/desktop/ms646844) structure in the Windows SDK for more information on these flags.
108108

109109
*pParentWnd*
110110
A pointer to the dialog box's parent or owner window.
@@ -123,7 +123,7 @@ HDC CreatePrinterDC();
123123
Handle to the newly created printer device context.
124124

125125
### Remarks
126-
The returned DC is also stored in the **hDC** member of [m_pdex](#m_pdex).
126+
The returned DC is also stored in the `hDC` member of [m_pdex](#m_pdex).
127127

128128
This DC is assumed to be the current printer DC, and any other previously obtained printer DCs must be deleted. This function can be called, and the resulting DC used, without ever displaying the Print dialog box.
129129

@@ -142,7 +142,7 @@ virtual INT_PTR DoModal();
142142

143143
After calling `DoModal`, you can call other member functions to retrieve the settings or information input by the user into the dialog box.
144144

145-
If the **PD_RETURNDC** flag is used when calling `DoModal`, a printer DC will be returned in the **hDC** member of [m_pdex](#m_pdex). This DC must be freed with a call to [DeleteDC](http://msdn.microsoft.com/library/windows/desktop/dd183533) by the caller of `CPrintDialogEx`.
145+
If the PD_RETURNDC flag is used when calling `DoModal`, a printer DC will be returned in the `hDC` member of [m_pdex](#m_pdex). This DC must be freed with a call to [DeleteDC](http://msdn.microsoft.com/library/windows/desktop/dd183533) by the caller of `CPrintDialogEx`.
146146

147147
## <a name="getcopies"></a> CPrintDialogEx::GetCopies
148148
Call this function after calling `DoModal` to retrieve the number of copies requested.
@@ -162,14 +162,14 @@ BOOL GetDefaults();
162162
```
163163

164164
### Return Value
165-
**TRUE** if successful, otherwise **FALSE**.
165+
TRUE if successful, otherwise FALSE.
166166

167167
### Remarks
168168
Creates a printer device context (DC) from the [DEVMODE](http://msdn.microsoft.com/library/windows/desktop/dd183565) and [DEVNAMES](../../mfc/reference/devnames-structure.md) structures.
169169

170-
`GetDefaults` does not display the Print property sheet. Instead, it sets the **hDevNames** and **hDevMode** members of [m_pdex](#m_pdex) to handles to the [DEVMODE](http://msdn.microsoft.com/library/windows/desktop/dd183565) and [DEVNAMES](../../mfc/reference/devnames-structure.md) structures that are initialized for the system default printer. Both **hDevNames** and **hDevMode** must be NULL, or `GetDefaults` fails.
170+
`GetDefaults` does not display the Print property sheet. Instead, it sets the `hDevNames` and `hDevMode` members of [m_pdex](#m_pdex) to handles to the [DEVMODE](http://msdn.microsoft.com/library/windows/desktop/dd183565) and [DEVNAMES](../../mfc/reference/devnames-structure.md) structures that are initialized for the system default printer. Both `hDevNames` and `hDevMode` must be NULL, or `GetDefaults` fails.
171171

172-
If the **PD_RETURNDC** flag is set, this function will not only return **hDevNames** and **hDevMode** (located in **m_pdex.hDevNames** and **m_pdex.hDevMode**) to the caller, but will also return a printer DC in **m_pdex.hDC**. It is the responsibility of the caller to delete the printer DC and call the Windows [GlobalFree](http://msdn.microsoft.com/library/windows/desktop/aa366579) function on the handles when you are finished with the `CPrintDialogEx` object.
172+
If the PD_RETURNDC flag is set, this function will not only return `hDevNames` and `hDevMode` (located in `m_pdex.hDevNames` and `m_pdex.hDevMode`) to the caller, but will also return a printer DC in `m_pdex.hDC`. It is the responsibility of the caller to delete the printer DC and call the Windows [GlobalFree](http://msdn.microsoft.com/library/windows/desktop/aa366579) function on the handles when you are finished with the `CPrintDialogEx` object.
173173

174174
## <a name="getdevicename"></a> CPrintDialogEx::GetDeviceName
175175
Call this function after calling [DoModal](#domodal) to retrieve the name of the currently selected printer, or after calling [GetDefaults](#getdefaults) to retrieve the name of the default printer.
@@ -250,7 +250,7 @@ BOOL PrintAll() const;
250250
```
251251

252252
### Return Value
253-
**TRUE** if all pages in the document are to be printed; otherwise **FALSE**.
253+
TRUE if all pages in the document are to be printed; otherwise FALSE.
254254

255255
## <a name="printcollate"></a> CPrintDialogEx::PrintCollate
256256
Call this function after calling `DoModal` to determine whether the printer should collate all printed copies of the document.
@@ -260,7 +260,7 @@ BOOL PrintCollate() const;
260260
```
261261

262262
### Return Value
263-
**TRUE** if the user selects the collate check box in the dialog box; otherwise **FALSE**.
263+
TRUE if the user selects the collate check box in the dialog box; otherwise FALSE.
264264

265265
## <a name="printcurrentpage"></a> CPrintDialogEx::PrintCurrentPage
266266
Call this function after calling `DoModal` to determine whether to print the current page in the document.
@@ -270,7 +270,7 @@ BOOL PrintCurrentPage() const;
270270
```
271271

272272
### Return Value
273-
**TRUE** if **Print Current Page** is selected in the print dialog; otherwise **FALSE**.
273+
TRUE if **Print Current Page** is selected in the print dialog; otherwise FALSE.
274274

275275
## <a name="printrange"></a> CPrintDialogEx::PrintRange
276276
Call this function after calling `DoModal` to determine whether to print only a range of pages in the document.
@@ -280,10 +280,10 @@ BOOL PrintRange() const;
280280
```
281281

282282
### Return Value
283-
**TRUE** if only a range of pages in the document are to be printed; otherwise **FALSE**.
283+
TRUE if only a range of pages in the document are to be printed; otherwise FALSE.
284284

285285
### Remarks
286-
The specified page ranges can be determined from [m_pdex](#m_pdex) (see **nPageRanges**, **nMaxPageRanges**, and **lpPageRanges** in the [PRINTDLGEX](http://msdn.microsoft.com/library/windows/desktop/ms646844) structure in the Windows SDK).
286+
The specified page ranges can be determined from [m_pdex](#m_pdex) (see `nPageRanges`, `nMaxPageRanges`, and `lpPageRanges` in the [PRINTDLGEX](http://msdn.microsoft.com/library/windows/desktop/ms646844) structure in the Windows SDK).
287287

288288
## <a name="printselection"></a> CPrintDialogEx::PrintSelection
289289
Call this function after calling `DoModal` to determine whether to print only the currently selected items.
@@ -293,7 +293,7 @@ BOOL PrintSelection() const;
293293
```
294294

295295
### Return Value
296-
**TRUE** if only the selected items are to be printed; otherwise **FALSE**.
296+
TRUE if only the selected items are to be printed; otherwise FALSE.
297297

298298
## See Also
299299
[CCommonDialog Class](../../mfc/reference/ccommondialog-class.md)

docs/mfc/reference/cprintinfo-structure.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct CPrintInfo
6262

6363
A `CPrintInfo` object is passed between the framework and your view class during the printing process and is used to exchange information between the two. For example, the framework informs the view class which page of the document to print by assigning a value to the `m_nCurPage` member of `CPrintInfo`; the view class retrieves the value and performs the actual printing of the specified page.
6464

65-
Another example is the case in which the length of the document is not known until it is printed. In this situation, the view class tests for the end of the document each time a page is printed. When the end is reached, the view class sets the `m_bContinuePrinting` member of `CPrintInfo` to **FALSE**; this informs the framework to stop the print loop.
65+
Another example is the case in which the length of the document is not known until it is printed. In this situation, the view class tests for the end of the document each time a page is printed. When the end is reached, the view class sets the `m_bContinuePrinting` member of `CPrintInfo` to FALSE; this informs the framework to stop the print loop.
6666

6767
`CPrintInfo` is used by the member functions of `CView` listed under "See Also." For more information about the printing architecture provided by the Microsoft Foundation Class Library, see [Frame Windows](../../mfc/frame-windows.md) and [Document/View Architecture](../../mfc/document-view-architecture.md) and the articles [Printing](../../mfc/printing.md) and [Printing: Multipage Documents](../../mfc/multipage-documents.md).
6868

@@ -130,7 +130,7 @@ UINT GetOffsetPage() const;
130130
The number of pages preceding the first page of a DocObject item being printed in a combined DocObject print job.
131131

132132
### Remarks
133-
This value is referenced by the **m_nOffsetPage** member. The first page of your document will be numbered the **m_nOffsetPage** value + 1 when printed as a DocObject with other active documents. The **m_nOffsetPage** member is valid only if the **m_bDocObject** value is **TRUE**.
133+
This value is referenced by the `m_nOffsetPage` member. The first page of your document will be numbered the `m_nOffsetPage` value + 1 when printed as a DocObject with other active documents. The `m_nOffsetPage` member is valid only if the `m_bDocObject` value is TRUE.
134134

135135
## <a name="gettopage"></a> CPrintInfo::GetToPage
136136
Call this function to retrieve the number of the last page to be printed.
@@ -151,75 +151,75 @@ UINT GetToPage() const;
151151
Contains a flag indicating whether the framework should continue the print loop.
152152

153153
### Remarks
154-
If you are doing print-time pagination, you can set this member to **FALSE** in your override of `CView::OnPrepareDC` once the end of the document has been reached. You do not have to modify this variable if you have specified the length of the document at the beginning of the print job using the `SetMaxPage` member function. The `m_bContinuePrinting` member is a public variable of type **BOOL**.
154+
If you are doing print-time pagination, you can set this member to FALSE in your override of `CView::OnPrepareDC` once the end of the document has been reached. You do not have to modify this variable if you have specified the length of the document at the beginning of the print job using the `SetMaxPage` member function. The `m_bContinuePrinting` member is a public variable of type BOOL.
155155

156156
## <a name="m_bdirect"></a> CPrintInfo::m_bDirect
157-
The framework sets this member to **TRUE** if the Print dialog box will be bypassed for direct printing; **FALSE** otherwise.
157+
The framework sets this member to TRUE if the Print dialog box will be bypassed for direct printing; FALSE otherwise.
158158

159159
### Remarks
160-
The Print dialog is normally bypassed when you print from the shell or when printing is done using the command ID **ID_FILE_PRINT_DIRECT**.
160+
The Print dialog is normally bypassed when you print from the shell or when printing is done using the command ID ID_FILE_PRINT_DIRECT.
161161

162162
You normally don't change this member, but if you do change it, change it before you call [CView::DoPreparePrinting](../../mfc/reference/cview-class.md#doprepareprinting) in your override of [CView::OnPreparePrinting](../../mfc/reference/cview-class.md#onprepareprinting).
163163

164164
## <a name="m_bdocobject"></a> CPrintInfo::m_bDocObject
165165
Contains a flag indicating whether the document being printed is a DocObject.
166166

167167
### Remarks
168-
Data members `m_dwFlags` and **m_nOffsetPage** are invalid unless this flag is **TRUE**.
168+
Data members `m_dwFlags` and `m_nOffsetPage` are invalid unless this flag is TRUE.
169169

170170
## <a name="m_bpreview"></a> CPrintInfo::m_bPreview
171171
Contains a flag indicating whether the document is being previewed.
172172

173173
### Remarks
174-
This is set by the framework depending on which command the user executed. The Print dialog box is not displayed for a print-preview job. The **m_bPreview** member is a public variable of type **BOOL**.
174+
This is set by the framework depending on which command the user executed. The Print dialog box is not displayed for a print-preview job. The `m_bPreview` member is a public variable of type BOOL.
175175

176176
## <a name="m_dwflags"></a> CPrintInfo::m_dwFlags
177177
Contains a combination of flags specifying DocObject printing operations.
178178

179179
### Remarks
180-
Valid only if data member **m_bDocObject** is **TRUE**.
180+
Valid only if data member `m_bDocObject` is TRUE.
181181

182182
The flags can be one or more of the following values:
183183

184-
- **PRINTFLAG_MAYBOTHERUSER**
184+
- PRINTFLAG_MAYBOTHERUSER
185185

186-
- **PRINTFLAG_PROMPTUSER**
186+
- PRINTFLAG_PROMPTUSER
187187

188-
- **PRINTFLAG_USERMAYCHANGEPRINTER**
188+
- PRINTFLAG_USERMAYCHANGEPRINTER
189189

190-
- **PRINTFLAG_RECOMPOSETODEVICE**
190+
- PRINTFLAG_RECOMPOSETODEVICE
191191

192-
- **PRINTFLAG_DONTACTUALLYPRINT**
192+
- PRINTFLAG_DONTACTUALLYPRINT
193193

194-
- **PRINTFLAG_FORCEPROPERTIES**
194+
- PRINTFLAG_FORCEPROPERTIES
195195

196-
- **PRINTFLAG_PRINTTOFILE**
196+
- PRINTFLAG_PRINTTOFILE
197197

198198
## <a name="m_lpuserdata"></a> CPrintInfo::m_lpUserData
199199
Contains a pointer to a user-created structure.
200200

201201
### Remarks
202-
You can use this to store printing-specific data that you do not want to store in your view class. The **m_lpUserData** member is a public variable of type **LPVOID**.
202+
You can use this to store printing-specific data that you do not want to store in your view class. The `m_lpUserData` member is a public variable of type LPVOID.
203203

204204
## <a name="m_ncurpage"></a> CPrintInfo::m_nCurPage
205205
Contains the number of the current page.
206206

207207
### Remarks
208208
The framework calls `CView::OnPrepareDC` and `CView::OnPrint` once for each page of the document, specifying a different value for this member each time; its values range from the value returned by `GetFromPage` to that returned by `GetToPage`. Use this member in your overrides of `CView::OnPrepareDC` and `CView::OnPrint` to print the specified page of the document.
209209

210-
When preview mode is first invoked, the framework reads the value of this member to determine which page of the document should be previewed initially. You can set the value of this member in your override of `CView::OnPreparePrinting` to maintain the user's current position in the document when entering preview mode. The `m_nCurPage` member is a public variable of type **UINT**.
210+
When preview mode is first invoked, the framework reads the value of this member to determine which page of the document should be previewed initially. You can set the value of this member in your override of `CView::OnPreparePrinting` to maintain the user's current position in the document when entering preview mode. The `m_nCurPage` member is a public variable of type UINT.
211211

212212
## <a name="m_njobnumber"></a> CPrintInfo::m_nJobNumber
213213
Indicates the job number assigned by the operating system for the current print job.
214214

215215
### Remarks
216-
This value may be **SP_ERROR** if the job hasn't yet printed (that is, if the `CPrintInfo` object is newly constructed and has not yet been used to print), or if there was an error in starting the job.
216+
This value may be SP_ERROR if the job hasn't yet printed (that is, if the `CPrintInfo` object is newly constructed and has not yet been used to print), or if there was an error in starting the job.
217217

218218
## <a name="m_nnumpreviewpages"></a> CPrintInfo::m_nNumPreviewPages
219219
Contains the number of pages displayed in preview mode; it can be either 1 or 2.
220220

221221
### Remarks
222-
The **m_nNumPreviewPages** member is a public variable of type **UINT**.
222+
The `m_nNumPreviewPages` member is a public variable of type UINT.
223223

224224
## <a name="m_noffsetpage"></a> CPrintInfo::m_nOffsetPage
225225
Contains the number of pages preceding the first page of a particular DocObject in a combined DocObject print job.
@@ -234,13 +234,13 @@ UINT GetToPage() const;
234234
Specifies the usable drawing area of the page in logical coordinates.
235235

236236
### Remarks
237-
You may want to refer to this in your override of `CView::OnPrint`. You can use this member to keep track of what area remains usable after you print headers, footers, and so on. The **m_rectDraw** member is a public variable of type `CRect`.
237+
You may want to refer to this in your override of `CView::OnPrint`. You can use this member to keep track of what area remains usable after you print headers, footers, and so on. The `m_rectDraw` member is a public variable of type `CRect`.
238238

239239
## <a name="m_strpagedesc"></a> CPrintInfo::m_strPageDesc
240240
Contains a format string used to display the page numbers during print preview; this string consists of two substrings, one for single-page display and one for double-page display, each terminated by a '\n' character.
241241

242242
### Remarks
243-
The framework uses "Page %u\nPages %u-%u\n" as the default value. If you want a different format for the page numbers, specify a format string in your override of `CView::OnPreparePrinting`. The **m_strPageDesc** member is a public variable of type `CString`.
243+
The framework uses "Page %u\nPages %u-%u\n" as the default value. If you want a different format for the page numbers, specify a format string in your override of `CView::OnPreparePrinting`. The `m_strPageDesc` member is a public variable of type `CString`.
244244

245245
## <a name="setmaxpage"></a> CPrintInfo::SetMaxPage
246246
Call this function to specify the number of the last page of the document.

0 commit comments

Comments
 (0)