From bf2fd28cf82d228d0a8d86a91538c442493b24f8 Mon Sep 17 00:00:00 2001
From: Colin Robertson <3836425+corob-msft@users.noreply.github.com>
Date: Wed, 30 Nov 2022 13:20:06 -0800
Subject: [PATCH 1/2] Bulk fix for adjacent snippet rendering
---
.../allocating-and-releasing-memory-for-a-bstr.md | 4 ++--
docs/atl-mfc-shared/cstring-argument-passing.md | 2 +-
.../atl-mfc-shared/reference/coledatetimespan-class.md | 2 +-
docs/atl-mfc-shared/reference/cstringt-class.md | 2 +-
docs/atl/reference/ccombstr-class.md | 2 +-
docs/atl/reference/ccomcontrolbase-class.md | 2 +-
docs/atl/reference/ccomobject-class.md | 2 +-
docs/atl/reference/ccomptr-class.md | 2 +-
docs/atl/reference/ccontainedwindowt-class.md | 4 ++--
docs/atl/reference/property-map-macros.md | 2 +-
docs/cppcx/delegates-c-cx.md | 2 +-
docs/cppcx/partial-classes-c-cx.md | 4 ++--
docs/data/oledb/cdataconnection-class.md | 4 ++--
docs/mfc/accessing-run-time-class-information.md | 2 +-
docs/mfc/reference/application-control.md | 2 +-
docs/mfc/reference/carchive-class.md | 6 +++---
docs/mfc/reference/ccmdtarget-class.md | 2 +-
docs/mfc/reference/ccmdui-class.md | 2 +-
docs/mfc/reference/cdatabase-class.md | 2 +-
docs/mfc/reference/cdialog-class.md | 2 +-
docs/mfc/reference/cdocument-class.md | 10 +++++-----
docs/mfc/reference/cevent-class.md | 2 +-
docs/mfc/reference/cfile-class.md | 2 +-
docs/mfc/reference/cfindreplacedialog-class.md | 4 ++--
docs/mfc/reference/cformview-class.md | 2 +-
docs/mfc/reference/cmdiframewnd-class.md | 2 +-
docs/mfc/reference/cmenu-class.md | 2 +-
docs/mfc/reference/cpropertypage-class.md | 10 +++++-----
docs/mfc/reference/cpropertysheet-class.md | 6 +++---
docs/mfc/reference/crecordset-class.md | 2 +-
docs/mfc/reference/cricheditctrl-class.md | 4 ++--
docs/mfc/reference/cscrollview-class.md | 2 +-
docs/mfc/reference/csingledoctemplate-class.md | 2 +-
docs/mfc/reference/csocket-class.md | 4 ++--
docs/mfc/reference/cstatusbar-class.md | 4 ++--
docs/mfc/reference/ctreectrl-class.md | 2 +-
docs/mfc/reference/ctypedptrlist-class.md | 2 +-
docs/mfc/reference/cwinapp-class.md | 8 ++++----
docs/mfc/reference/cwinformsview-class.md | 2 +-
docs/mfc/reference/cwnd-class.md | 6 +++---
docs/mfc/reference/diagnostic-services.md | 4 ++--
docs/mfc/reference/registering-ole-controls.md | 2 +-
docs/mfc/reference/run-time-object-model-services.md | 4 ++--
.../mfc/storing-and-loading-cobjects-via-an-archive.md | 2 +-
docs/parallel/concrt/parallel-algorithms.md | 2 +-
45 files changed, 72 insertions(+), 72 deletions(-)
diff --git a/docs/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md b/docs/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md
index 73a93334f33..b257f105f93 100644
--- a/docs/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md
+++ b/docs/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md
@@ -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:
diff --git a/docs/atl-mfc-shared/cstring-argument-passing.md b/docs/atl-mfc-shared/cstring-argument-passing.md
index 7c5a6a469e3..9b163016492 100644
--- a/docs/atl-mfc-shared/cstring-argument-passing.md
+++ b/docs/atl-mfc-shared/cstring-argument-passing.md
@@ -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
diff --git a/docs/atl-mfc-shared/reference/coledatetimespan-class.md b/docs/atl-mfc-shared/reference/coledatetimespan-class.md
index 37b57be197e..491074bbae3 100644
--- a/docs/atl-mfc-shared/reference/coledatetimespan-class.md
+++ b/docs/atl-mfc-shared/reference/coledatetimespan-class.md
@@ -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)]
## COleDateTimeSpan::COleDateTimeSpan
diff --git a/docs/atl-mfc-shared/reference/cstringt-class.md b/docs/atl-mfc-shared/reference/cstringt-class.md
index 6921e0fded0..ffff1211a42 100644
--- a/docs/atl-mfc-shared/reference/cstringt-class.md
+++ b/docs/atl-mfc-shared/reference/cstringt-class.md
@@ -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)]
-
+
[!code-cpp[NVC_ATLMFC_Utilities#120](../../atl-mfc-shared/codesnippet/cpp/cstringt-class_15.cpp)]
## `CStringT::GetEnvironmentVariable`
diff --git a/docs/atl/reference/ccombstr-class.md b/docs/atl/reference/ccombstr-class.md
index 14c7a7e8d83..1b9c97788be 100644
--- a/docs/atl/reference/ccombstr-class.md
+++ b/docs/atl/reference/ccombstr-class.md
@@ -538,7 +538,7 @@ This assertion is not enabled by default. Define `ATL_CCOMBSTR_ADDRESS_OF_ASSERT
### Example
[!code-cpp[NVC_ATL_Utilities#46](../../atl/codesnippet/cpp/ccombstr-class_14.cpp)]
-
+
[!code-cpp[NVC_ATL_Utilities#47](../../atl/codesnippet/cpp/ccombstr-class_15.cpp)]
## `CComBSTR::operator +=`
diff --git a/docs/atl/reference/ccomcontrolbase-class.md b/docs/atl/reference/ccomcontrolbase-class.md
index f6b457426fc..f65f6c90ee2 100644
--- a/docs/atl/reference/ccomcontrolbase-class.md
+++ b/docs/atl/reference/ccomcontrolbase-class.md
@@ -252,7 +252,7 @@ One of the standard HRESULT values.
### Example
[!code-cpp[NVC_ATL_COM#19](../../atl/codesnippet/cpp/ccomcontrolbase-class_2.cpp)]
-
+
[!code-cpp[NVC_ATL_COM#20](../../atl/codesnippet/cpp/ccomcontrolbase-class_3.h)]
## CComControlBase::FireViewChange
diff --git a/docs/atl/reference/ccomobject-class.md b/docs/atl/reference/ccomobject-class.md
index 7c63e2eca1f..940285715a1 100644
--- a/docs/atl/reference/ccomobject-class.md
+++ b/docs/atl/reference/ccomobject-class.md
@@ -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)]
-
+
[!code-cpp[NVC_ATL_COM#39](../../atl/codesnippet/cpp/ccomobject-class_2.cpp)]
## CComObject::QueryInterface
diff --git a/docs/atl/reference/ccomptr-class.md b/docs/atl/reference/ccomptr-class.md
index ab102f9213e..6ccf6090383 100644
--- a/docs/atl/reference/ccomptr-class.md
+++ b/docs/atl/reference/ccomptr-class.md
@@ -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)]
-
+
[!code-cpp[NVC_ATL_Utilities#131](../../atl/codesnippet/cpp/ccomptr-class_2.cpp)]
In Debug builds, link atlsd.lib for code tracing.
diff --git a/docs/atl/reference/ccontainedwindowt-class.md b/docs/atl/reference/ccontainedwindowt-class.md
index 66ea867c296..92e55f8f39c 100644
--- a/docs/atl/reference/ccontainedwindowt-class.md
+++ b/docs/atl/reference/ccontainedwindowt-class.md
@@ -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)]
-
+
[!code-cpp[NVC_ATL_Windowing#39](../../atl/codesnippet/cpp/ccontainedwindowt-class_2.h)]
-
+
[!code-cpp[NVC_ATL_Windowing#40](../../atl/codesnippet/cpp/ccontainedwindowt-class_3.h)]
|For more information about|See|
diff --git a/docs/atl/reference/property-map-macros.md b/docs/atl/reference/property-map-macros.md
index a871dd49ab6..c0e785543db 100644
--- a/docs/atl/reference/property-map-macros.md
+++ b/docs/atl/reference/property-map-macros.md
@@ -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)]
-
+
[!code-cpp[NVC_ATL_Windowing#132](../../atl/codesnippet/cpp/property-map-macros_3.h)]
## PROP_ENTRY_TYPE
diff --git a/docs/cppcx/delegates-c-cx.md b/docs/cppcx/delegates-c-cx.md
index a06eeab890b..af0f96e6d68 100644
--- a/docs/cppcx/delegates-c-cx.md
+++ b/docs/cppcx/delegates-c-cx.md
@@ -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)]
-
+
[!code-cpp[Cx_delegates#119](../cppcx/codesnippet/CPP/delegatesevents/class1.cpp#119)]
### Construction
diff --git a/docs/cppcx/partial-classes-c-cx.md b/docs/cppcx/partial-classes-c-cx.md
index b17036025e1..d6e18b397e6 100644
--- a/docs/cppcx/partial-classes-c-cx.md
+++ b/docs/cppcx/partial-classes-c-cx.md
@@ -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)]
-
+
[!code-cpp[cx_partial#06](../cppcx/codesnippet/CPP/partialclassexample/class1.h#06)]
## Templates
@@ -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)]
-
+
[!code-cpp[cx_partial#09](../cppcx/codesnippet/CPP/partialclassexample/address.h#09)]
## See also
diff --git a/docs/data/oledb/cdataconnection-class.md b/docs/data/oledb/cdataconnection-class.md
index 6185ad46918..d388cafa612 100644
--- a/docs/data/oledb/cdataconnection-class.md
+++ b/docs/data/oledb/cdataconnection-class.md
@@ -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)]
-
+
[!code-cpp[NVC_OLEDB_Consumer#4](../../data/oledb/codesnippet/cpp/cdataconnection-operator-cdatasource-amp_2.cpp)]
## `CDataConnection::operator CDataSource*`
@@ -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)]
-
+
[!code-cpp[NVC_OLEDB_Consumer#6](../../data/oledb/codesnippet/cpp/cdataconnection-operator-csession-amp_2.cpp)]
## `CDataConnection::operator CSession*`
diff --git a/docs/mfc/accessing-run-time-class-information.md b/docs/mfc/accessing-run-time-class-information.md
index b0fd0b53c76..c8891bb05ce 100644
--- a/docs/mfc/accessing-run-time-class-information.md
+++ b/docs/mfc/accessing-run-time-class-information.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCCObjectSample#5](codesnippet/cpp/accessing-run-time-class-information_3.cpp)]
> [!NOTE]
diff --git a/docs/mfc/reference/application-control.md b/docs/mfc/reference/application-control.md
index b858a4d41b7..8c32271d69c 100644
--- a/docs/mfc/reference/application-control.md
+++ b/docs/mfc/reference/application-control.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCAutomation#4](../../mfc/codesnippet/cpp/application-control_3.cpp)]
### Requirements
diff --git a/docs/mfc/reference/carchive-class.md b/docs/mfc/reference/carchive-class.md
index 637d0a6d484..043ef933ebb 100644
--- a/docs/mfc/reference/carchive-class.md
+++ b/docs/mfc/reference/carchive-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCSerialization#19](../../mfc/codesnippet/cpp/carchive-class_8.cpp)]
-
+
[!code-cpp[NVC_MFCSerialization#20](../../mfc/codesnippet/cpp/carchive-class_9.h)]
-
+
[!code-cpp[NVC_MFCSerialization#21](../../mfc/codesnippet/cpp/carchive-class_10.cpp)]
## `CArchive::m_pDocument`
diff --git a/docs/mfc/reference/ccmdtarget-class.md b/docs/mfc/reference/ccmdtarget-class.md
index 6da05a3a24a..6d4a3bb06a6 100644
--- a/docs/mfc/reference/ccmdtarget-class.md
+++ b/docs/mfc/reference/ccmdtarget-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#45](../../mfc/codesnippet/cpp/ccmdtarget-class_3.cpp)]
## `CCmdTarget::OnFinalRelease`
diff --git a/docs/mfc/reference/ccmdui-class.md b/docs/mfc/reference/ccmdui-class.md
index 0d90c19e9b7..f110e8be151 100644
--- a/docs/mfc/reference/ccmdui-class.md
+++ b/docs/mfc/reference/ccmdui-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#47](../../mfc/codesnippet/cpp/ccmdui-class_2.cpp)]
## CCmdUI::m_nID
diff --git a/docs/mfc/reference/cdatabase-class.md b/docs/mfc/reference/cdatabase-class.md
index aa96521cb0a..77fb3fd71c9 100644
--- a/docs/mfc/reference/cdatabase-class.md
+++ b/docs/mfc/reference/cdatabase-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDatabase#10](../../mfc/codesnippet/cpp/cdatabase-class_2.cpp)]
## `CDatabase::Close`
diff --git a/docs/mfc/reference/cdialog-class.md b/docs/mfc/reference/cdialog-class.md
index 0f2eb95f528..099d0e3718e 100644
--- a/docs/mfc/reference/cdialog-class.md
+++ b/docs/mfc/reference/cdialog-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCControlLadenDialog#65](../../mfc/codesnippet/cpp/cdialog-class_4.cpp)]
## CDialog::GetDefID
diff --git a/docs/mfc/reference/cdocument-class.md b/docs/mfc/reference/cdocument-class.md
index 5ab35556df6..53f7c00e9c9 100644
--- a/docs/mfc/reference/cdocument-class.md
+++ b/docs/mfc/reference/cdocument-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#61](../../mfc/codesnippet/cpp/cdocument-class_6.cpp)]
-
+
[!code-cpp[NVC_MFCDocView#62](../../mfc/codesnippet/cpp/cdocument-class_7.cpp)]
## `CDocument::OnOpenDocument`
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#61](../../mfc/codesnippet/cpp/cdocument-class_6.cpp)]
-
+
[!code-cpp[NVC_MFCDocView#62](../../mfc/codesnippet/cpp/cdocument-class_7.cpp)]
-
+
[!code-cpp[NVC_MFCDocView#63](../../mfc/codesnippet/cpp/cdocument-class_8.cpp)]
## `CDocument::OnPreviewHandlerQueryFocus`
diff --git a/docs/mfc/reference/cevent-class.md b/docs/mfc/reference/cevent-class.md
index d9d30ffa385..2ed97e9f1d4 100644
--- a/docs/mfc/reference/cevent-class.md
+++ b/docs/mfc/reference/cevent-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFC_Utilities#46](../../mfc/codesnippet/cpp/cevent-class_2.cpp)]
## Inheritance Hierarchy
diff --git a/docs/mfc/reference/cfile-class.md b/docs/mfc/reference/cfile-class.md
index de431233f28..85224ecfbdc 100644
--- a/docs/mfc/reference/cfile-class.md
+++ b/docs/mfc/reference/cfile-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCFiles#14](../../atl-mfc-shared/reference/codesnippet/cpp/cfile-class_10.cpp)]
## CFile::operator HANDLE
diff --git a/docs/mfc/reference/cfindreplacedialog-class.md b/docs/mfc/reference/cfindreplacedialog-class.md
index 4f4ac279860..e2354f49f94 100644
--- a/docs/mfc/reference/cfindreplacedialog-class.md
+++ b/docs/mfc/reference/cfindreplacedialog-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#172](../../mfc/codesnippet/cpp/cfindreplacedialog-class_3.cpp)]
-
+
[!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.
diff --git a/docs/mfc/reference/cformview-class.md b/docs/mfc/reference/cformview-class.md
index de28089798d..2166ba0f16c 100644
--- a/docs/mfc/reference/cformview-class.md
+++ b/docs/mfc/reference/cformview-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#91](../../mfc/codesnippet/cpp/cformview-class_2.cpp)]
## `CFormView::IsInitDlgCompleted`
diff --git a/docs/mfc/reference/cmdiframewnd-class.md b/docs/mfc/reference/cmdiframewnd-class.md
index 4a000c3fe84..8e5dc3025ae 100644
--- a/docs/mfc/reference/cmdiframewnd-class.md
+++ b/docs/mfc/reference/cmdiframewnd-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCWindowing#20](../../mfc/reference/codesnippet/cpp/cmdiframewnd-class_8.cpp)]
## CMDIFrameWnd::MDITile
diff --git a/docs/mfc/reference/cmenu-class.md b/docs/mfc/reference/cmenu-class.md
index 2b144ffb589..70d8e40d751 100644
--- a/docs/mfc/reference/cmenu-class.md
+++ b/docs/mfc/reference/cmenu-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCWindowing#33](../../mfc/reference/codesnippet/cpp/cmenu-class_13.cpp)]
## `CMenu::SetMenuItemInfo`
diff --git a/docs/mfc/reference/cpropertypage-class.md b/docs/mfc/reference/cpropertypage-class.md
index 670fd1ddc38..cfddd645dea 100644
--- a/docs/mfc/reference/cpropertypage-class.md
+++ b/docs/mfc/reference/cpropertypage-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#120](../../mfc/codesnippet/cpp/cpropertypage-class_10.cpp)]
-
+
[!code-cpp[NVC_MFCDocView#121](../../mfc/codesnippet/cpp/cpropertypage-class_11.cpp)]
-
+
[!code-cpp[NVC_MFCDocView#122](../../mfc/codesnippet/cpp/cpropertypage-class_12.cpp)]
## `CPropertyPage::OnWizardNext`
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#125](../../mfc/codesnippet/cpp/cpropertypage-class_15.cpp)]
-
+
[!code-cpp[NVC_MFCDocView#126](../../mfc/codesnippet/cpp/cpropertypage-class_16.cpp)]
## `CPropertyPage::SetModified`
diff --git a/docs/mfc/reference/cpropertysheet-class.md b/docs/mfc/reference/cpropertysheet-class.md
index 0ab6b76fe9d..000ec9eb63c 100644
--- a/docs/mfc/reference/cpropertysheet-class.md
+++ b/docs/mfc/reference/cpropertysheet-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#133](../../mfc/codesnippet/cpp/cpropertysheet-class_5.cpp)]
## `CPropertySheet::DoModal`
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#141](../../mfc/codesnippet/cpp/cpropertysheet-class_14.cpp)]
-
+
[!code-cpp[NVC_MFCDocView#138](../../mfc/codesnippet/cpp/cpropertysheet-class_11.cpp)]
## `CPropertySheet::SetWizardMode`
diff --git a/docs/mfc/reference/crecordset-class.md b/docs/mfc/reference/crecordset-class.md
index 9265ac72794..b24ab2f9642 100644
--- a/docs/mfc/reference/crecordset-class.md
+++ b/docs/mfc/reference/crecordset-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDatabase#22](../../mfc/codesnippet/cpp/crecordset-class_6.cpp)]
## `CRecordset::GetBookmark`
diff --git a/docs/mfc/reference/cricheditctrl-class.md b/docs/mfc/reference/cricheditctrl-class.md
index 21cda42093f..3acdab323fa 100644
--- a/docs/mfc/reference/cricheditctrl-class.md
+++ b/docs/mfc/reference/cricheditctrl-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFC_CRichEditCtrl#35](../../mfc/reference/codesnippet/cpp/cricheditctrl-class_35.cpp)]
## `CRichEditCtrl::StreamOut`
@@ -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)]
-
+
[!code-cpp[NVC_MFC_CRichEditCtrl#37](../../mfc/reference/codesnippet/cpp/cricheditctrl-class_37.cpp)]
## `CRichEditCtrl::Undo`
diff --git a/docs/mfc/reference/cscrollview-class.md b/docs/mfc/reference/cscrollview-class.md
index 3cca28a8061..17e1c7e1bd3 100644
--- a/docs/mfc/reference/cscrollview-class.md
+++ b/docs/mfc/reference/cscrollview-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocView#169](../../mfc/codesnippet/cpp/cscrollview-class_6.cpp)]
## See also
diff --git a/docs/mfc/reference/csingledoctemplate-class.md b/docs/mfc/reference/csingledoctemplate-class.md
index a8ad3922e2c..ef86c373897 100644
--- a/docs/mfc/reference/csingledoctemplate-class.md
+++ b/docs/mfc/reference/csingledoctemplate-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCDocViewSDI#14](../../mfc/codesnippet/cpp/csingledoctemplate-class_2.cpp)]
## See also
diff --git a/docs/mfc/reference/csocket-class.md b/docs/mfc/reference/csocket-class.md
index 437001deb40..b7cb5b69c98 100644
--- a/docs/mfc/reference/csocket-class.md
+++ b/docs/mfc/reference/csocket-class.md
@@ -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)]
-
+
[!code-cpp[NVC_MFCSocketThread#2](../../mfc/reference/codesnippet/cpp/csocket-class_3.cpp)]
-
+
[!code-cpp[NVC_MFCSocketThread#3](../../mfc/reference/codesnippet/cpp/csocket-class_4.cpp)]
## `CSocket::CancelBlockingCall`
diff --git a/docs/mfc/reference/cstatusbar-class.md b/docs/mfc/reference/cstatusbar-class.md
index 3a7b614c75c..ff4116ac648 100644
--- a/docs/mfc/reference/cstatusbar-class.md
+++ b/docs/mfc/reference/cstatusbar-class.md
@@ -462,9 +462,9 @@ After you call `SetPaneText`, you must add a UI update handler to display the ne
### Example
[!code-cpp[NVC_MFCDocView#176](../../mfc/codesnippet/cpp/cstatusbar-class_1.cpp)]
-
+
[!code-cpp[NVC_MFCDocView#177](../../mfc/codesnippet/cpp/cstatusbar-class_2.cpp)]
-
+
[!code-cpp[NVC_MFCDocView#178](../../mfc/codesnippet/cpp/cstatusbar-class_3.cpp)]
## See also
diff --git a/docs/mfc/reference/ctreectrl-class.md b/docs/mfc/reference/ctreectrl-class.md
index 83e6a7fccb0..81ce2a29cb7 100644
--- a/docs/mfc/reference/ctreectrl-class.md
+++ b/docs/mfc/reference/ctreectrl-class.md
@@ -2154,7 +2154,7 @@ The *`lParam1`* and *`lParam2`* parameters correspond to the `lParam` member of
### Example
[!code-cpp[NVC_MFC_CTreeCtrl#38](../../mfc/reference/codesnippet/cpp/ctreectrl-class_46.cpp)]
-
+
[!code-cpp[NVC_MFC_CTreeCtrl#39](../../mfc/reference/codesnippet/cpp/ctreectrl-class_47.cpp)]
## See also
diff --git a/docs/mfc/reference/ctypedptrlist-class.md b/docs/mfc/reference/ctypedptrlist-class.md
index 9eefb3d44ac..dd4e551d00b 100644
--- a/docs/mfc/reference/ctypedptrlist-class.md
+++ b/docs/mfc/reference/ctypedptrlist-class.md
@@ -61,7 +61,7 @@ For more information on using `CTypedPtrList`, see the articles [Collections](..
This example creates an instance of `CTypedPtrList`, adds one object, serializes the list to disk, and then deletes the object:
[!code-cpp[NVC_MFCCollections#110](../../mfc/codesnippet/cpp/ctypedptrlist-class_1.cpp)]
-
+
[!code-cpp[NVC_MFCCollections#111](../../mfc/codesnippet/cpp/ctypedptrlist-class_2.cpp)]
## Inheritance Hierarchy
diff --git a/docs/mfc/reference/cwinapp-class.md b/docs/mfc/reference/cwinapp-class.md
index 21cdc641e93..db9e83c08fb 100644
--- a/docs/mfc/reference/cwinapp-class.md
+++ b/docs/mfc/reference/cwinapp-class.md
@@ -975,7 +975,7 @@ Use the `LoadOEMCursor` or [LoadStandardCursor](#loadstandardcursor) member func
### Example
[!code-cpp[NVC_MFCWindowing#45](../../mfc/reference/codesnippet/cpp/cwinapp-class_12.h)]
-
+
[!code-cpp[NVC_MFCWindowing#46](../../mfc/reference/codesnippet/cpp/cwinapp-class_13.cpp)]
## CWinApp::LoadOEMIcon
@@ -1386,7 +1386,7 @@ See [Technical Note 22](../../mfc/tn022-standard-commands-implementation.md) for
### Example
[!code-cpp[NVC_MFCWindowing#49](../../mfc/reference/codesnippet/cpp/cwinapp-class_25.cpp)]
-
+
[!code-cpp[NVC_MFCWindowing#50](../../mfc/reference/codesnippet/cpp/cwinapp-class_26.cpp)]
## CWinApp::OnFileOpen
@@ -1406,7 +1406,7 @@ For information on default behavior and guidance on how to override this member
### Example
[!code-cpp[NVC_MFCWindowing#49](../../mfc/reference/codesnippet/cpp/cwinapp-class_25.cpp)]
-
+
[!code-cpp[NVC_MFCWindowing#50](../../mfc/reference/codesnippet/cpp/cwinapp-class_26.cpp)]
## CWinApp::OnFilePrintSetup
@@ -1426,7 +1426,7 @@ For information on default behavior and guidance on how to override this member
### Example
[!code-cpp[NVC_MFCWindowing#49](../../mfc/reference/codesnippet/cpp/cwinapp-class_25.cpp)]
-
+
[!code-cpp[NVC_MFCWindowing#50](../../mfc/reference/codesnippet/cpp/cwinapp-class_26.cpp)]
## CWinApp::OnHelp
diff --git a/docs/mfc/reference/cwinformsview-class.md b/docs/mfc/reference/cwinformsview-class.md
index b681ae885ad..624a55aadff 100644
--- a/docs/mfc/reference/cwinformsview-class.md
+++ b/docs/mfc/reference/cwinformsview-class.md
@@ -70,7 +70,7 @@ A pointer to the data type of the Windows Forms user control.
In the following example, the `CUserView` class inherits from `CWinFormsView` and passes the type of `UserControl1` to the `CWinFormsView` constructor. `UserControl1` is a custom-built control in ControlLibrary1.dll.
[!code-cpp[NVC_MFC_Managed#1](../../mfc/reference/codesnippet/cpp/cwinformsview-class_1.h)]
-
+
[!code-cpp[NVC_MFC_Managed#2](../../mfc/reference/codesnippet/cpp/cwinformsview-class_2.cpp)]
## CWinFormsView::GetControl
diff --git a/docs/mfc/reference/cwnd-class.md b/docs/mfc/reference/cwnd-class.md
index c419c24c6b4..228d66b7355 100644
--- a/docs/mfc/reference/cwnd-class.md
+++ b/docs/mfc/reference/cwnd-class.md
@@ -711,9 +711,9 @@ Nonzero if successful; otherwise 0.
This example shows how to use `Attach` and `Detach` to map to the MDI client window.
[!code-cpp[NVC_MFCWindowing#67](../../mfc/reference/codesnippet/cpp/cwnd-class_2.h)]
-
+
[!code-cpp[NVC_MFCWindowing#68](../../mfc/reference/codesnippet/cpp/cwnd-class_3.cpp)]
-
+
[!code-cpp[NVC_MFCWindowing#69](../../mfc/reference/codesnippet/cpp/cwnd-class_4.cpp)]
## `CWnd::BeginModalState`
@@ -2059,7 +2059,7 @@ The default tool tips provided for your windows by `EnableToolTips` do not have
### Example
[!code-cpp[NVC_MFCWindowing#91](../../mfc/reference/codesnippet/cpp/cwnd-class_30.cpp)]
-
+
[!code-cpp[NVC_MFCWindowing#92](../../mfc/reference/codesnippet/cpp/cwnd-class_31.cpp)]
## `CWnd::EnableTrackingToolTips`
diff --git a/docs/mfc/reference/diagnostic-services.md b/docs/mfc/reference/diagnostic-services.md
index 7b1856d5835..7bd4aab5395 100644
--- a/docs/mfc/reference/diagnostic-services.md
+++ b/docs/mfc/reference/diagnostic-services.md
@@ -863,7 +863,7 @@ Serializable `CObject`-derived classes are classes derived using the DECLARE_SER
### Example
[!code-cpp[NVC_MFCCollections#113](../../mfc/codesnippet/cpp/diagnostic-services_16.cpp)]
-
+
[!code-cpp[NVC_MFCCollections#114](../../mfc/codesnippet/cpp/diagnostic-services_17.cpp)]
### Requirements
@@ -898,7 +898,7 @@ Stack, global, or embedded objects are not enumerated. The pointer passed to `Af
### Example
[!code-cpp[NVC_MFCCollections#115](../../mfc/codesnippet/cpp/diagnostic-services_18.cpp)]
-
+
[!code-cpp[NVC_MFCCollections#116](../../mfc/codesnippet/cpp/diagnostic-services_19.cpp)]
## See also
diff --git a/docs/mfc/reference/registering-ole-controls.md b/docs/mfc/reference/registering-ole-controls.md
index 8de8baa13dc..8dd7892ccec 100644
--- a/docs/mfc/reference/registering-ole-controls.md
+++ b/docs/mfc/reference/registering-ole-controls.md
@@ -224,7 +224,7 @@ This function updates the registry with the type library name and its location o
### Example
[!code-cpp[NVC_MFCAutomation#7](../../mfc/codesnippet/cpp/registering-ole-controls_3.cpp)]
-
+
[!code-cpp[NVC_MFCAutomation#8](../../mfc/codesnippet/cpp/registering-ole-controls_4.cpp)]
### Requirements
diff --git a/docs/mfc/reference/run-time-object-model-services.md b/docs/mfc/reference/run-time-object-model-services.md
index c0a9d10f0bf..b33e44f8ffd 100644
--- a/docs/mfc/reference/run-time-object-model-services.md
+++ b/docs/mfc/reference/run-time-object-model-services.md
@@ -268,7 +268,7 @@ For more information, see [`CObject` Class Topics](../../mfc/using-cobject.md).
### Example
[!code-cpp[NVC_MFCCObjectSample#2](../../mfc/codesnippet/cpp/run-time-object-model-services_3.h)]
-
+
[!code-cpp[NVC_MFCCObjectSample#3](../../mfc/codesnippet/cpp/run-time-object-model-services_4.cpp)]
### Requirements
@@ -304,7 +304,7 @@ Note that this macro definition will invoke the default constructor for your cla
### Example
[!code-cpp[NVC_MFCCObjectSample#22](../../mfc/codesnippet/cpp/run-time-object-model-services_5.h)]
-
+
[!code-cpp[NVC_MFCCObjectSample#23](../../mfc/codesnippet/cpp/run-time-object-model-services_6.cpp)]
### Requirements
diff --git a/docs/mfc/storing-and-loading-cobjects-via-an-archive.md b/docs/mfc/storing-and-loading-cobjects-via-an-archive.md
index 174a0a762ee..ccbafa9bdb8 100644
--- a/docs/mfc/storing-and-loading-cobjects-via-an-archive.md
+++ b/docs/mfc/storing-and-loading-cobjects-via-an-archive.md
@@ -21,7 +21,7 @@ Therefore, whether you use the `CArchive` **<\<** and **>>** operators, versus c
The following example illustrates the cases:
[!code-cpp[NVC_MFCSerialization#36](../mfc/codesnippet/cpp/storing-and-loading-cobjects-via-an-archive_1.h)]
-
+
[!code-cpp[NVC_MFCSerialization#37](../mfc/codesnippet/cpp/storing-and-loading-cobjects-via-an-archive_2.cpp)]
In summary, if your serializable class defines an embedded `CObject` as a member, you should *not* use the `CArchive` **<\<** and **>>** operators for that object, but should call the `Serialize` function instead. Also, if your serializable class defines a pointer to a `CObject` (or an object derived from `CObject`) as a member, but constructs this other object in its own constructor, you should also call `Serialize`.
diff --git a/docs/parallel/concrt/parallel-algorithms.md b/docs/parallel/concrt/parallel-algorithms.md
index d6513e3a85c..b9f60473e1a 100644
--- a/docs/parallel/concrt/parallel-algorithms.md
+++ b/docs/parallel/concrt/parallel-algorithms.md
@@ -265,7 +265,7 @@ For illustration, this example uses a relatively small data set. You can increas
This example uses a lambda expression as the hash function. You can also use one of the built-in implementations of the std::[hash class](../../standard-library/hash-class.md) or define your own specialization. You can also use a custom hash function object, as shown in this example:
[!code-cpp[concrt-parallel-sort-points#2](../../parallel/concrt/codesnippet/cpp/parallel-algorithms_13.cpp)]
-
+
[!code-cpp[concrt-parallel-sort-points#3](../../parallel/concrt/codesnippet/cpp/parallel-algorithms_14.cpp)]
The hash function must return an integral type ([std::is_integral::value](../../standard-library/is-integral-class.md) must be **`true`**). This integral type must be convertible to type `size_t`.
From 58a9a755ac719497de7364db1b345a3e5acfb20e Mon Sep 17 00:00:00 2001
From: Colin Robertson <3836425+corob-msft@users.noreply.github.com>
Date: Wed, 30 Nov 2022 15:16:38 -0800
Subject: [PATCH 2/2] Demo adjacent snippet bug
---
docs/atl/reference/ccombstr-class.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/atl/reference/ccombstr-class.md b/docs/atl/reference/ccombstr-class.md
index 1b9c97788be..14c7a7e8d83 100644
--- a/docs/atl/reference/ccombstr-class.md
+++ b/docs/atl/reference/ccombstr-class.md
@@ -538,7 +538,7 @@ This assertion is not enabled by default. Define `ATL_CCOMBSTR_ADDRESS_OF_ASSERT
### Example
[!code-cpp[NVC_ATL_Utilities#46](../../atl/codesnippet/cpp/ccombstr-class_14.cpp)]
-
+
[!code-cpp[NVC_ATL_Utilities#47](../../atl/codesnippet/cpp/ccombstr-class_15.cpp)]
## `CComBSTR::operator +=`