Hosting a Windows Form User Control in an MFC Dialog Box

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

MFC hosts a Windows Forms control as a special kind of ActiveX control and communicates with the control by using ActiveX interfaces, and properties and methods of the Control class. We recommend that you use .NET Framework properties and methods to operate on the control.

For a sample application that shows Windows Forms used with MFC, see MFC and Windows Forms Integration.

System_CAPS_ICON_note.jpg Note

In the current release, a CDialogBar object cannot host Windows Forms controls.

How to: Create the User Control and Host in a Dialog Box

How to: Do DDX/DDV Data Binding with Windows Forms

How to: Sink Windows Forms Events from Native C++ Classes

CWinFormsControl Class | CDialog Class | CWnd Class | Control

Using a Windows Form User Control in MFC
Windows Forms/MFC Programming Differences
Hosting a Windows Forms User Control as an MFC View
Hosting a Windows Form User Control as an MFC Dialog Box

Show: