You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/mfc/reference/extension-dll-macros.md
+18-18
Original file line number
Diff line number
Diff line change
@@ -27,12 +27,12 @@ ms.workload: ["cplusplus"]
27
27
28
28
29
29
## <aname="afx_ext_class"></a> AFX_EXT_CLASS
30
-
[MFC extension DLLs](../../build/extension-dlls.md) use the macro **AFX_EXT_CLASS** to export classes; the executables that link to the MFC extension DLL use the macro to import classes.
30
+
[MFC extension DLLs](../../build/extension-dlls.md) use the macro AFX_EXT_CLASS to export classes; the executables that link to the MFC extension DLL use the macro to import classes.
31
31
32
32
### Remarks
33
-
With the **AFX_EXT_CLASS** macro, the same header file(s) used to build the MFC extension DLL can be used with the executables that link to the DLL.
33
+
With the AFX_EXT_CLASS macro, the same header file(s) used to build the MFC extension DLL can be used with the executables that link to the DLL.
34
34
35
-
In the header file for your DLL, add the **AFX_EXT_CLASS** keyword to the declaration of your class as follows:
35
+
In the header file for your DLL, add the AFX_EXT_CLASS keyword to the declaration of your class as follows:
36
36
37
37
```cpp
38
38
classAFX_EXT_CLASS CMyClass : public CDocument
@@ -54,11 +54,11 @@ Call this macro to protect an exported function in a DLL.
54
54
AFX_MANAGE_STATE(AFX_MODULE_STATE* pModuleState )
55
55
```
56
56
### Parameters
57
-
`pModuleState`
57
+
*pModuleState*
58
58
A pointer to an `AFX_MODULE_STATE` structure.
59
59
60
60
### Remarks
61
-
When this macro is invoked, `pModuleState` is the effective module state for the remainder of the immediate containing scope. Upon leaving the scope, the previous effective module state will be automatically restored.
61
+
When this macro is invoked, *pModuleState* is the effective module state for the remainder of the immediate containing scope. Upon leaving the scope, the previous effective module state will be automatically restored.
62
62
The `AFX_MODULE_STATE` structure contains global data for the module, that is, the portion of the module state that is pushed or popped.
63
63
By default, MFC uses the resource handle of the main application to load the resource template. If you have an exported function in a DLL, such as one that launches a dialog box in the DLL, this template is actually stored in the DLL module. You need to switch the module state for the correct handle to be used. You can do this by adding the following code to the beginning of the function:
The MFC OLE DLL is an MFC extension DLL; in order for an MFC extension DLL to get wired into a **CDynLinkLibrary** chain, it must create a **CDynLinkLibrary** object in the context of every module that will be using it. `AfxOleInitModule` creates the **CDynLinkLibrary** object in your regular MFC DLL's context so that it gets wired into the **CDynLinkLibrary** object chain of the regular MFC DLL.
87
+
The MFC OLE DLL is an MFC extension DLL; in order for an MFC extension DLL to get wired into a `CDynLinkLibrary` chain, it must create a `CDynLinkLibrary` object in the context of every module that will be using it. `AfxOleInitModule` creates the `CDynLinkLibrary` object in your regular MFC DLL's context so that it gets wired into the `CDynLinkLibrary` object chain of the regular MFC DLL.
88
88
89
-
If you are building an OLE control and are using `COleControlModule`, you should not call **AfxOleInitModule** because the `InitInstance` member function for `COleControlModule` calls `AfxOleInitModule`.
89
+
If you are building an OLE control and are using `COleControlModule`, you should not call `AfxOleInitModule` because the `InitInstance` member function for `COleControlModule` calls `AfxOleInitModule`.
For MFC Sockets support from a regular MFC DLL that is dynamically linked to MFC, add a call to this function in your regular MFC DLL's **CWinApp::InitInstance** function to initialize the MFC Sockets DLL.
99
+
For MFC Sockets support from a regular MFC DLL that is dynamically linked to MFC, add a call to this function in your regular MFC DLL's `CWinApp::InitInstance` function to initialize the MFC Sockets DLL.
100
100
101
101
### Syntax
102
102
```
103
103
void AFXAPI AfxNetInitModule( );
104
104
```
105
105
106
106
### Remarks
107
-
The MFC Sockets DLL is an MFC extension DLL; in order for an MFC extension DLL to get wired into a **CDynLinkLibrary** chain, it must create a **CDynLinkLibrary** object in the context of every module that will be using it. `AfxNetInitModule` creates the **CDynLinkLibrary** object in your regular MFC DLL's context so that it gets wired into the **CDynLinkLibrary** object chain of the regular MFC DLL.
107
+
The MFC Sockets DLL is an MFC extension DLL; in order for an MFC extension DLL to get wired into a `CDynLinkLibrary` chain, it must create a `CDynLinkLibrary` object in the context of every module that will be using it. `AfxNetInitModule` creates the `CDynLinkLibrary` object in your regular MFC DLL's context so that it gets wired into the `CDynLinkLibrary` object chain of the regular MFC DLL.
108
108
109
109
### Requirements
110
110
**Header:** <afxdll_.h>
@@ -177,14 +177,14 @@ Call this function in an MFC extension DLL's `DllMain` to initialize the DLL.
A reference to the [AFX_EXTENSION_MODULE Structure](afx-extension-module-structure.md) structure that will contain the state of the MFC extension DLL module after the initialization. The state includes a copy of the runtime class objects that have been initialized by the MFC extension DLL as part of normal static object construction executed before `DllMain` is entered.
182
182
183
-
`hModule`
183
+
*hModule*
184
184
A handle of the MFC extension DLL module.
185
185
186
186
### Return Value
187
-
**TRUE** if the MFC extension DLL is successfully initialized; otherwise, **FALSE**.
187
+
TRUE if the MFC extension DLL is successfully initialized; otherwise, FALSE.
`AfxInitExtensionModule` makes a copy of the DLL's **HMODULE** and captures the DLL's runtime-classes (`CRuntimeClass` structures) as well as its object factories (`COleObjectFactory` objects) for use later when the **CDynLinkLibrary** object is created.
210
+
`AfxInitExtensionModule` makes a copy of the DLL's HMODULE and captures the DLL's runtime-classes (`CRuntimeClass` structures) as well as its object factories (`COleObjectFactory` objects) for use later when the `CDynLinkLibrary` object is created.
211
211
MFC extension DLLs need to do two things in their `DllMain` function:
212
212
- Call [AfxInitExtensionModule](#_mfc_afxinitextensionmodule) and check the return value.
213
-
- Create a **CDynLinkLibrary** object if the DLL will be exporting [CRuntimeClass Structure](cruntimeclass-structure.md) objects or has its own custom resources.
213
+
- Create a `CDynLinkLibrary` object if the DLL will be exporting [CRuntimeClass Structure](cruntimeclass-structure.md) objects or has its own custom resources.
214
214
You can call `AfxTermExtensionModule` to clean up the MFC extension DLL when each process detaches from the MFC extension DLL (which happens when the process exits, or when the DLL is unloaded as a result of an `AfxFreeLibrary` call).
215
215
216
216
### Requirements
@@ -229,7 +229,7 @@ Use this function to set the per-module state flag, which affects the WinSxS beh
229
229
);
230
230
```
231
231
### Parameters
232
-
`bSet`
232
+
*bSet*
233
233
New value of the module state flag.
234
234
235
235
### Remarks
@@ -263,11 +263,11 @@ Call this function to allow MFC to cleanup the MFC extension DLL when each proce
If your application loads and frees MFC extension DLLs dynamically, be sure to call `AfxTermExtensionModule`. Since most MFC extension DLLs are not dynamically loaded (usually, they are linked via their import libraries), the call to `AfxTermExtensionModule` is usually not necessary.
307
307
308
-
MFC extension DLLs need to call [AfxInitExtensionModule](#afxinitextensionmodule) in their `DllMain`. If the DLL will be exporting [CRuntimeClass](cruntimeclass-structure.md) objects or has its own custom resources, you also need to create a **CDynLinkLibrary** object in `DllMain`.
308
+
MFC extension DLLs need to call [AfxInitExtensionModule](#afxinitextensionmodule) in their `DllMain`. If the DLL will be exporting [CRuntimeClass](cruntimeclass-structure.md) objects or has its own custom resources, you also need to create a `CDynLinkLibrary` object in `DllMain`.
The other dither color, typically light gray (COLOR_MENU).
139
139
140
140
### Remarks
141
-
The source bitmap is drawn on the destination DC with a two-color (`cr1` and `cr2`) checkered pattern replacing the bitmap's background. The background of the source bitmap is defined as its white pixels and all pixels matching the color of the pixel in the upper-left corner of the bitmap.
141
+
The source bitmap is drawn on the destination DC with a two-color (*cr1* and *cr2*) checkered pattern replacing the bitmap's background. The background of the source bitmap is defined as its white pixels and all pixels matching the color of the pixel in the upper-left corner of the bitmap.
142
142
143
143

The other dither color, typically light gray (COLOR_MENU).
175
175
176
176
### Remarks
177
-
The source bitmap is copied to the destination bitmap with a two-color (`cr1` and `cr2`) checkered pattern replacing the source bitmap's background. The background of the source bitmap is defined as its white pixels and all pixels matching the color of the pixel in the upper-left corner of the bitmap.
177
+
The source bitmap is copied to the destination bitmap with a two-color (*cr1* and *cr2*) checkered pattern replacing the source bitmap's background. The background of the source bitmap is defined as its white pixels and all pixels matching the color of the pixel in the upper-left corner of the bitmap.
178
178
179
179

Copy file name to clipboardexpand all lines: docs/mfc/reference/hse-version-info-structure.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.author: "mblome"
13
13
ms.workload: ["cplusplus"]
14
14
---
15
15
# HSE_VERSION_INFO Structure
16
-
This structure is pointed to by the `pVer` parameter in the `CHttpServer::GetExtensionVersion` member function. It provides the ISA version number and a text description of the ISA.
16
+
This structure is pointed to by the *pVer* parameter in the `CHttpServer::GetExtensionVersion` member function. It provides the ISA version number and a text description of the ISA.
Copy file name to clipboardexpand all lines: docs/mfc/reference/icommandsource-interface.md
+18-18
Original file line number
Diff line number
Diff line change
@@ -57,9 +57,9 @@ void AddCommandHandler(
57
57
```
58
58
59
59
### Parameters
60
-
`cmdID`
60
+
*cmdID*
61
61
The command ID.
62
-
`cmdHandler`
62
+
*cmdHandler*
63
63
A handle to the command handler method.
64
64
65
65
### Remarks
@@ -76,11 +76,11 @@ void AddCommandRangeHandler(
76
76
CommandHandler^ cmdHandler);
77
77
```
78
78
### Parameters
79
-
`cmdIDMin`
79
+
*cmdIDMin*
80
80
The beginning index of the command ID range.
81
-
`cmdIDMax`
81
+
*cmdIDMax*
82
82
The ending index of the command ID range.
83
-
`cmdHandler`
83
+
*cmdHandler*
84
84
A handle to the message handler method to which the commands are mapped.
85
85
### Remarks
86
86
This method maps a contiguous range of command IDs to a single message handler and adds it to the command source object. This is used for handling a group of related buttons with one method.
A handle to the message handler method to which the commands are mapped.
103
103
104
104
### Remarks
@@ -112,9 +112,9 @@ void AddCommandUIHandler(
112
112
CommandUIHandler^ cmdUIHandler);
113
113
```
114
114
### Parameters
115
-
`cmdID`
115
+
*cmdID*
116
116
The command ID.
117
-
`cmdUIHandler`
117
+
*cmdUIHandler*
118
118
A handle to the user interface command message handler method.
119
119
120
120
### Remarks
@@ -126,7 +126,7 @@ Posts a message without waiting for it to be processed.
126
126
void PostCommand(unsigned int command);
127
127
```
128
128
### Parameters
129
-
`command`
129
+
*command*
130
130
The command ID of the message to be posted.
131
131
### Remarks
132
132
This method asynchronously posts the message mapped to the ID specified by command. It calls CWnd::PostMessage to place the message in the window's message queue and then returns without waiting for the corresponding window to process the message.
@@ -138,7 +138,7 @@ Removes a command handler from a command source object.
138
138
void RemoveCommandHandler(unsigned int cmdID);
139
139
```
140
140
### Parameters
141
-
`cmdID`
141
+
*cmdID*
142
142
The command ID.
143
143
### Remarks
144
144
This method removes the command handler mapped to cmdID from the command source object.
This method removes a group of user interface command message handlers, mapped to the command IDs specifed by cmdIDMin and cmdIDMax, from the command source object.
@@ -180,7 +180,7 @@ Removes a user interface command message handler from a command source object.
180
180
void RemoveCommandUIHandler(unsigned int cmdID);
181
181
```
182
182
### Parameters
183
-
`cmdID`
183
+
*cmdID*
184
184
The command ID.
185
185
### Remarks
186
186
This method removes the user interface command message handler mapped to cmdID from the command source object.
@@ -191,7 +191,7 @@ Sends a message and waits for it to be processed before returning.
191
191
void SendCommand(unsigned int command);
192
192
```
193
193
### Parameters
194
-
`command`
194
+
*command*
195
195
The command ID of the message to be sent.
196
196
### Remarks
197
197
This method synchronously sends the message mapped to the ID specified by command. It calls CWnd::SendMessage to place the message in the window's message queue and waits until that window procedure has processed the message before returning.
0 commit comments