Using the MFC Windows Forms support classes, you can host Windows Forms controls within your MFC applications as an ActiveX control within MFC dialog boxes or views. In addition, Windows Forms forms can be hosted as MFC dialog boxes.
The following sections describe how to:
-
Host a Windows Forms control in an MFC dialog box.
-
Host a Windows Forms user control as an MFC view.
-
Host a Windows Forms form as an MFC dialog box.
Note |
---|
MFC Windows Forms integration works only in projects that link dynamically with MFC (projects in which AFXDLL is defined). |
Note |
---|
When you build your application using a private (modified) copy of the MFC Windows Forms interfaces DLL (mfcmifc80.dll), it will fail to install in the GAC unless you replace the Microsoft key with your own vendor key. For more information on assembly signing, see |
For sample applications using Windows Forms, see
For a sample application that shows Windows Forms used with MFC, see
In This Section
Hosting a Windows Form User Control in an MFC Dialog Box