Skip to content

Repo sync for protected CLA branch #4318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ In general, the rules for allocating and releasing memory allocated for `BSTR`s
- When you call into a function that expects a `BSTR` argument, you must allocate the memory for the `BSTR` before the call and release it afterwards. For example:

[!code-cpp[NVC_ATLMFC_Utilities#192](../atl-mfc-shared/codesnippet/cpp/allocating-and-releasing-memory-for-a-bstr_1.cpp)]

 
[!code-cpp[NVC_ATLMFC_Utilities#193](../atl-mfc-shared/codesnippet/cpp/allocating-and-releasing-memory-for-a-bstr_2.cpp)]

- When you call into a function that returns a `BSTR`, you must free the string yourself. For example:

[!code-cpp[NVC_ATLMFC_Utilities#194](../atl-mfc-shared/codesnippet/cpp/allocating-and-releasing-memory-for-a-bstr_3.cpp)]

 
[!code-cpp[NVC_ATLMFC_Utilities#195](../atl-mfc-shared/codesnippet/cpp/allocating-and-releasing-memory-for-a-bstr_4.cpp)]

- When you implement a function that returns a `BSTR`, allocate the string but do not free it. The receiving function releases the memory. For example:
Expand Down
2 changes: 1 addition & 1 deletion docs/atl-mfc-shared/cstring-argument-passing.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If the string contents are to be changed by a function, declare the parameter as
Typically you can return `CString` objects from functions because `CString` objects follow value semantics like primitive types. To return a read-only string, use a constant `CString` reference (`const CString&`). The following example illustrates the use of `CString` parameters and return types:

[!code-cpp[NVC_ATLMFC_Utilities#197](../atl-mfc-shared/codesnippet/cpp/cstring-argument-passing_1.cpp)]

 
[!code-cpp[NVC_ATLMFC_Utilities#198](../atl-mfc-shared/codesnippet/cpp/cstring-argument-passing_2.cpp)]

## See also
Expand Down
2 changes: 1 addition & 1 deletion docs/atl-mfc-shared/reference/coledatetimespan-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ These operators compare two date/time-span values and return TRUE if the conditi
### Example

[!code-cpp[NVC_ATLMFC_Utilities#25](../../atl-mfc-shared/codesnippet/cpp/coledatetimespan-class_1.cpp)]

 
[!code-cpp[NVC_ATLMFC_Utilities#26](../../atl-mfc-shared/codesnippet/cpp/coledatetimespan-class_2.cpp)]

## <a name="coledatetimespan"></a> COleDateTimeSpan::COleDateTimeSpan
Expand Down
2 changes: 1 addition & 1 deletion docs/atl-mfc-shared/reference/cstringt-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ Writes a formatted string and a variable list of arguments to a **`CStringT`** s
### Example

[!code-cpp[NVC_ATLMFC_Utilities#119](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_14.cpp)]

&nbsp;
[!code-cpp[NVC_ATLMFC_Utilities#120](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_15.cpp)]

## <a name="getenvironmentvariable"></a> `CStringT::GetEnvironmentVariable`
Expand Down
2 changes: 1 addition & 1 deletion docs/atl/reference/ccomcontrolbase-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ One of the standard HRESULT values.
### Example

[!code-cpp[NVC_ATL_COM#19](../../atl/codesnippet/cpp/ccomcontrolbase-class_2.cpp)]

&nbsp;
[!code-cpp[NVC_ATL_COM#20](../../atl/codesnippet/cpp/ccomcontrolbase-class_3.h)]

## <a name="fireviewchange"></a> CComControlBase::FireViewChange
Expand Down
2 changes: 1 addition & 1 deletion docs/atl/reference/ccomobject-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ If you do not need direct access to the object, but still want to create a new o
### Example

[!code-cpp[NVC_ATL_COM#38](../../atl/codesnippet/cpp/ccomobject-class_1.h)]

&nbsp;
[!code-cpp[NVC_ATL_COM#39](../../atl/codesnippet/cpp/ccomobject-class_2.cpp)]

## <a name="queryinterface"></a> CComObject::QueryInterface
Expand Down
2 changes: 1 addition & 1 deletion docs/atl/reference/ccomptr-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ATL uses `CComPtr` and [`CComQIPtr`](../../atl/reference/ccomqiptr-class.md) to
The `CComPtr` and [`CComQIPtr`](../../atl/reference/ccomqiptr-class.md) classes can help eliminate memory leaks by performing automatic reference counting. The following functions both do the same logical operations. However, the second version may be less error-prone because it uses the `CComPtr` class:

[!code-cpp[NVC_ATL_Utilities#130](../../atl/codesnippet/cpp/ccomptr-class_1.cpp)]

&nbsp;
[!code-cpp[NVC_ATL_Utilities#131](../../atl/codesnippet/cpp/ccomptr-class_2.cpp)]

In Debug builds, link atlsd.lib for code tracing.
Expand Down
4 changes: 2 additions & 2 deletions docs/atl/reference/ccontainedwindowt-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ A traits class that defines styles for your window. The default is `CControlWinT
When you use the **Add control based on** option in the ATL Project Wizard, the wizard will automatically add a `CContainedWindowT` data member to the class implementing the control. The following example shows how the contained window is declared:

[!code-cpp[NVC_ATL_Windowing#38](../../atl/codesnippet/cpp/ccontainedwindowt-class_1.h)]

&nbsp;
[!code-cpp[NVC_ATL_Windowing#39](../../atl/codesnippet/cpp/ccontainedwindowt-class_2.h)]

&nbsp;
[!code-cpp[NVC_ATL_Windowing#40](../../atl/codesnippet/cpp/ccontainedwindowt-class_3.h)]

|For more information about|See|
Expand Down
2 changes: 1 addition & 1 deletion docs/atl/reference/property-map-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ When you create an ActiveX control, the wizard inserts this macro after the prop
In the following example, the extent of the object (`m_sizeExtent`) is being persisted.

[!code-cpp[NVC_ATL_Windowing#131](../../atl/codesnippet/cpp/property-map-macros_2.h)]

&nbsp;
[!code-cpp[NVC_ATL_Windowing#132](../../atl/codesnippet/cpp/property-map-macros_3.h)]

## <a name="prop_entry_type"></a> PROP_ENTRY_TYPE
Expand Down
2 changes: 1 addition & 1 deletion docs/cppcx/delegates-c-cx.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ It then calls the member function and passes the delegate. Assume that `ci` is a
In the next example, a client app passes a custom delegate to a public method in a Windows Runtime component that executes the delegate against each item in a `Vector`:

[!code-cpp[Cx_delegates#118](../cppcx/codesnippet/CPP/clientapp/mainpage.xaml.cpp#118)]

&nbsp;
[!code-cpp[Cx_delegates#119](../cppcx/codesnippet/CPP/delegatesevents/class1.cpp#119)]

### Construction
Expand Down
4 changes: 2 additions & 2 deletions docs/cppcx/partial-classes-c-cx.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ At the point of the full definition of the class X, the behavior is the same as
The following two code examples have identical meaning and effect. The first example uses a partial class and the second example doesn't.

[!code-cpp[cx_partial#05](../cppcx/codesnippet/CPP/partialclassexample/class1.h#05)]

&nbsp;
[!code-cpp[cx_partial#06](../cppcx/codesnippet/CPP/partialclassexample/class1.h#06)]

## Templates
Expand All @@ -87,7 +87,7 @@ The **`partial`** keyword is supported only in combination with the **`ref class
The following example defines the `Address` class across two code files. The designer modifies `Address.details.h` and you modify `Address.h`. Only the class definition in the first file uses the **`partial`** keyword.

[!code-cpp[cx_partial#07](../cppcx/codesnippet/CPP/partialclassexample/address.details.h#07)]

&nbsp;
[!code-cpp[cx_partial#09](../cppcx/codesnippet/CPP/partialclassexample/address.h#09)]

## See also
Expand Down
4 changes: 2 additions & 2 deletions docs/data/oledb/cdataconnection-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ This operator returns a reference to the contained `CDataSource` object, allowin
If you have a function (such as `func` below) that takes a `CDataSource` reference, you can use `CDataSource&` to pass a `CDataConnection` object instead.

[!code-cpp[NVC_OLEDB_Consumer#3](../../data/oledb/codesnippet/cpp/cdataconnection-operator-cdatasource-amp_1.cpp)]

&nbsp;
[!code-cpp[NVC_OLEDB_Consumer#4](../../data/oledb/codesnippet/cpp/cdataconnection-operator-cdatasource-amp_2.cpp)]

## <a name="op_cdata_star"></a> `CDataConnection::operator CDataSource*`
Expand Down Expand Up @@ -217,7 +217,7 @@ This operator returns a reference to the contained `CSession` object, allowing y
If you have a function (such as `func` below) that takes a `CSession` reference, you can use `CSession&` to pass a `CDataConnection` object instead.

[!code-cpp[NVC_OLEDB_Consumer#5](../../data/oledb/codesnippet/cpp/cdataconnection-operator-csession-amp_1.cpp)]

&nbsp;
[!code-cpp[NVC_OLEDB_Consumer#6](../../data/oledb/codesnippet/cpp/cdataconnection-operator-csession-amp_2.cpp)]

## <a name="op_csession_star"></a> `CDataConnection::operator CSession*`
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/accessing-run-time-class-information.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You will rarely need to access the run-time class object directly. A more common
1. Call the `IsKindOf` member function for objects of that class, using the `RUNTIME_CLASS` macro to generate the `CRuntimeClass` argument, as shown here:

[!code-cpp[NVC_MFCCObjectSample#2](codesnippet/cpp/accessing-run-time-class-information_2.h)]

&nbsp;
[!code-cpp[NVC_MFCCObjectSample#5](codesnippet/cpp/accessing-run-time-class-information_3.cpp)]

> [!NOTE]
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/application-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Call this function to access the current `COleMessageFilter`-derived object, jus
### Example

[!code-cpp[NVC_MFCAutomation#3](../../mfc/codesnippet/cpp/application-control_2.cpp)]

&nbsp;
[!code-cpp[NVC_MFCAutomation#4](../../mfc/codesnippet/cpp/application-control_3.cpp)]

### Requirements
Expand Down
6 changes: 3 additions & 3 deletions docs/mfc/reference/carchive-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,11 @@ You can call `MapObject` when you store to and load from the `CArchive` object.
### Example

[!code-cpp[NVC_MFCSerialization#18](../../mfc/codesnippet/cpp/carchive-class_7.h)]

&nbsp;
[!code-cpp[NVC_MFCSerialization#19](../../mfc/codesnippet/cpp/carchive-class_8.cpp)]

&nbsp;
[!code-cpp[NVC_MFCSerialization#20](../../mfc/codesnippet/cpp/carchive-class_9.h)]

&nbsp;
[!code-cpp[NVC_MFCSerialization#21](../../mfc/codesnippet/cpp/carchive-class_10.cpp)]

## <a name="m_pdocument"></a> `CArchive::m_pDocument`
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/ccmdtarget-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ If you override `OnCmdMsg`, you must supply the appropriate value for *`nCode`*,
### Example

[!code-cpp[NVC_MFCDocView#44](../../mfc/codesnippet/cpp/ccmdtarget-class_2.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#45](../../mfc/codesnippet/cpp/ccmdtarget-class_3.cpp)]

## <a name="onfinalrelease"></a> `CCmdTarget::OnFinalRelease`
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/ccmdui-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ TRUE to enable the item, FALSE to disable it.
### Example

[!code-cpp[NVC_MFCDocView#46](../../mfc/codesnippet/cpp/ccmdui-class_1.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#47](../../mfc/codesnippet/cpp/ccmdui-class_2.cpp)]

## <a name="m_nid"></a> CCmdUI::m_nID
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/cdatabase-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ You may find it convenient to embed the `CDatabase` object in your document clas
This example illustrates using `CDatabase` in a `CDocument`-derived class.

[!code-cpp[NVC_MFCDatabase#9](../../mfc/codesnippet/cpp/cdatabase-class_1.h)]

&nbsp;
[!code-cpp[NVC_MFCDatabase#10](../../mfc/codesnippet/cpp/cdatabase-class_2.cpp)]

## <a name="close"></a> `CDatabase::Close`
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/cdialog-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ You can call `EndDialog` at any time, even in [OnInitDialog](#oninitdialog), in
### Example

[!code-cpp[NVC_MFCControlLadenDialog#64](../../mfc/codesnippet/cpp/cdialog-class_3.cpp)]

&nbsp;
[!code-cpp[NVC_MFCControlLadenDialog#65](../../mfc/codesnippet/cpp/cdialog-class_4.cpp)]

## <a name="getdefid"></a> CDialog::GetDefID
Expand Down
10 changes: 5 additions & 5 deletions docs/mfc/reference/cdocument-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,9 @@ Note that there are cases where `OnNewDocument` is called twice. This occurs whe
The following examples illustrate alternative methods of initializing a document object.

[!code-cpp[NVC_MFCDocView#60](../../mfc/codesnippet/cpp/cdocument-class_5.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#61](../../mfc/codesnippet/cpp/cdocument-class_6.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#62](../../mfc/codesnippet/cpp/cdocument-class_7.cpp)]

## <a name="onopendocument"></a> `CDocument::OnOpenDocument`
Expand Down Expand Up @@ -738,11 +738,11 @@ If the user chooses the File Open command in an SDI application, the framework u
The following examples illustrate alternative methods of initializing a document object.

[!code-cpp[NVC_MFCDocView#60](../../mfc/codesnippet/cpp/cdocument-class_5.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#61](../../mfc/codesnippet/cpp/cdocument-class_6.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#62](../../mfc/codesnippet/cpp/cdocument-class_7.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#63](../../mfc/codesnippet/cpp/cdocument-class_8.cpp)]

## <a name="onpreviewhandlerqueryfocus"></a> `CDocument::OnPreviewHandlerQueryFocus`
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/cevent-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ For more information about how to use `CEvent` objects, see [Multithreading: How
## Example

[!code-cpp[NVC_MFC_Utilities#45](../../mfc/codesnippet/cpp/cevent-class_1.cpp)]

&nbsp;
[!code-cpp[NVC_MFC_Utilities#46](../../mfc/codesnippet/cpp/cevent-class_2.cpp)]

## Inheritance Hierarchy
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/cfile-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ The following table describes the possible results of `Open`.
### Example

[!code-cpp[NVC_MFCFiles#13](../../atl-mfc-shared/reference/codesnippet/cpp/cfile-class_9.cpp)]

&nbsp;
[!code-cpp[NVC_MFCFiles#14](../../atl-mfc-shared/reference/codesnippet/cpp/cfile-class_10.cpp)]

## <a name="operator_handle"></a> CFile::operator HANDLE
Expand Down
4 changes: 2 additions & 2 deletions docs/mfc/reference/cfindreplacedialog-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ Nonzero if the dialog box object was successfully created; otherwise 0.
In order for the parent window to be notified of find/replace requests, you must use the Windows [RegisterWindowMessage](/windows/win32/api/winuser/nf-winuser-registerwindowmessagew) function whose return value is a message number unique to the application's instance. Your frame window should have a message map entry that declares the callback function ( `OnFindReplace` in the example that follows) that handles this registered message. The following code fragment is an example of how to do this for a frame window class named `CMyRichEditView`:

[!code-cpp[NVC_MFCDocView#171](../../mfc/codesnippet/cpp/cfindreplacedialog-class_2.h)]

&nbsp;
[!code-cpp[NVC_MFCDocView#172](../../mfc/codesnippet/cpp/cfindreplacedialog-class_3.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#173](../../mfc/codesnippet/cpp/cfindreplacedialog-class_4.cpp)]

Within your `OnFindReplace` function, you interpret the intentions of the user by using the [CFindReplaceDialog::FindNext](#findnext) and [CFindReplaceDialog::IsTerminating](#isterminating) methods and you create the code for the find/replace operations.
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/cformview-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The form-view window and child controls aren't created until `CWnd::Create` is c
### Example

[!code-cpp[NVC_MFCDocView#90](../../mfc/codesnippet/cpp/cformview-class_1.h)]

&nbsp;
[!code-cpp[NVC_MFCDocView#91](../../mfc/codesnippet/cpp/cformview-class_2.cpp)]

## <a name="isinitdlgcompleted"></a> `CFormView::IsInitDlgCompleted`
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/cmdiframewnd-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ Do not call this member function if you use the framework to manage your MDI chi
### Example

[!code-cpp[NVC_MFCWindowing#19](../../mfc/reference/codesnippet/cpp/cmdiframewnd-class_7.cpp)]

&nbsp;
[!code-cpp[NVC_MFCWindowing#20](../../mfc/reference/codesnippet/cpp/cmdiframewnd-class_8.cpp)]

## <a name="mditile"></a> CMDIFrameWnd::MDITile
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/cmenu-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ The Windows `GetMenuCheckMarkDimensions` function retrieves the dimensions of th
### Example

[!code-cpp[NVC_MFCWindowing#32](../../mfc/reference/codesnippet/cpp/cmenu-class_12.cpp)]

&nbsp;
[!code-cpp[NVC_MFCWindowing#33](../../mfc/reference/codesnippet/cpp/cmenu-class_13.cpp)]

## <a name="setmenuiteminfo"></a> `CMenu::SetMenuItemInfo`
Expand Down
10 changes: 5 additions & 5 deletions docs/mfc/reference/cpropertypage-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,11 @@ For more information on how to make a wizard-type property sheet, see [`CPropert
### Example

[!code-cpp[NVC_MFCDocView#119](../../mfc/codesnippet/cpp/cpropertypage-class_9.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#120](../../mfc/codesnippet/cpp/cpropertypage-class_10.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#121](../../mfc/codesnippet/cpp/cpropertypage-class_11.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#122](../../mfc/codesnippet/cpp/cpropertypage-class_12.cpp)]

## <a name="onwizardnext"></a> `CPropertyPage::OnWizardNext`
Expand Down Expand Up @@ -505,9 +505,9 @@ If a page returns a nonzero value, the property sheet doesn't send the message t
### Example

[!code-cpp[NVC_MFCDocView#124](../../mfc/codesnippet/cpp/cpropertypage-class_14.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#125](../../mfc/codesnippet/cpp/cpropertypage-class_15.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#126](../../mfc/codesnippet/cpp/cpropertypage-class_16.cpp)]

## <a name="setmodified"></a> `CPropertyPage::SetModified`
Expand Down
6 changes: 3 additions & 3 deletions docs/mfc/reference/cpropertysheet-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ To display a modal property sheet, call [`DoModal`](#domodal) instead.
### Example

[!code-cpp[NVC_MFCDocView#132](../../mfc/codesnippet/cpp/cpropertysheet-class_4.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#133](../../mfc/codesnippet/cpp/cpropertysheet-class_5.cpp)]

## <a name="domodal"></a> `CPropertySheet::DoModal`
Expand Down Expand Up @@ -750,9 +750,9 @@ If you want to change the text on the Finish button or hide the Next and Back bu
A `CPropertySheet` has three wizard property pages: `CStylePage`, `CColorPage`, and `CShapePage`. The code fragment below shows how to enable and disable the **Back** and **Next** buttons on the wizard property page.

[!code-cpp[NVC_MFCDocView#140](../../mfc/codesnippet/cpp/cpropertysheet-class_13.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#141](../../mfc/codesnippet/cpp/cpropertysheet-class_14.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#138](../../mfc/codesnippet/cpp/cpropertysheet-class_11.cpp)]

## <a name="setwizardmode"></a> `CPropertySheet::SetWizardMode`
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/crecordset-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ Your stored procedure needs to have bound fields if you want to call `FlushResul
The following code assumes that `COutParamRecordset` is a `CRecordset`-derived object based on a predefined query with an input parameter and an output parameter, and having multiple result sets. Note the structure of the [`DoFieldExchange`](#dofieldexchange) override.

[!code-cpp[NVC_MFCDatabase#21](../../mfc/codesnippet/cpp/crecordset-class_5.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDatabase#22](../../mfc/codesnippet/cpp/crecordset-class_6.cpp)]

## <a name="getbookmark"></a> `CRecordset::GetBookmark`
Expand Down
4 changes: 2 additions & 2 deletions docs/mfc/reference/cricheditctrl-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@ For more information, see [`EM_STREAMIN`](/windows/win32/Controls/em-streamin) m
### Example

[!code-cpp[NVC_MFC_CRichEditCtrl#34](../../mfc/reference/codesnippet/cpp/cricheditctrl-class_34.cpp)]

&nbsp;
[!code-cpp[NVC_MFC_CRichEditCtrl#35](../../mfc/reference/codesnippet/cpp/cricheditctrl-class_35.cpp)]

## <a name="streamout"></a> `CRichEditCtrl::StreamOut`
Expand Down Expand Up @@ -2018,7 +2018,7 @@ For more information, see [`EM_STREAMOUT`](/windows/win32/Controls/em-streamout)
### Example

[!code-cpp[NVC_MFC_CRichEditCtrl#36](../../mfc/reference/codesnippet/cpp/cricheditctrl-class_36.cpp)]

&nbsp;
[!code-cpp[NVC_MFC_CRichEditCtrl#37](../../mfc/reference/codesnippet/cpp/cricheditctrl-class_37.cpp)]

## <a name="undo"></a> `CRichEditCtrl::Undo`
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/cscrollview-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ You must set the mapping mode to any of the Windows mapping modes except `MM_ISO
### Example

[!code-cpp[NVC_MFCDocView#168](../../mfc/codesnippet/cpp/cscrollview-class_5.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocView#169](../../mfc/codesnippet/cpp/cscrollview-class_6.cpp)]

## See also
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/reference/csingledoctemplate-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Dynamically allocate a `CSingleDocTemplate` object and pass it to `CWinApp::AddD
### Example

[!code-cpp[NVC_MFCDocViewSDI#13](../../mfc/codesnippet/cpp/csingledoctemplate-class_1.cpp)]

&nbsp;
[!code-cpp[NVC_MFCDocViewSDI#14](../../mfc/codesnippet/cpp/csingledoctemplate-class_2.cpp)]

## See also
Expand Down
4 changes: 2 additions & 2 deletions docs/mfc/reference/csocket-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ For more information, see [Windows Sockets: Using Sockets with Archives](../../m
### Example

[!code-cpp[NVC_MFCSocketThread#1](../../mfc/reference/codesnippet/cpp/csocket-class_2.h)]

&nbsp;
[!code-cpp[NVC_MFCSocketThread#2](../../mfc/reference/codesnippet/cpp/csocket-class_3.cpp)]

&nbsp;
[!code-cpp[NVC_MFCSocketThread#3](../../mfc/reference/codesnippet/cpp/csocket-class_4.cpp)]

## <a name="cancelblockingcall"></a> `CSocket::CancelBlockingCall`
Expand Down
Loading