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).
If your MFC application uses Windows Forms, you need to redistribute mfcmifc80.dll with your application. For more information, see Redistributing the MFC Library.
Hosting a Windows Form User Control in an MFC Dialog Box
Hosting a Windows Forms User Control as an MFC View
Hosting a Windows Form User Control as an MFC Dialog Box
CWinFormsControl Class
CWinFormsDialog Class
CWinFormsView Class
ICommandSource Interface
ICommandTarget Interface
ICommandUI Interface
IView Interface
CommandHandler
DDX_ManagedControl
UICheckState
Windows Forms
Windows Forms Controls
User Interface Elements
Form Views