Hosting a Windows Forms User Control in an MFC Dialog Box

MFC hosts a Windows Forms control as a special kind of ActiveX control and communicates with the control using ActiveX interfaces (for example, IOleObject) and properties and methods of the Control class. In general, you should 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 WinForms Integration.

Note

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

In This Section

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

Reference

CWinFormsControl Class | CDialog Class | CWnd Class | Control

See Also

Tasks

Hosting a Windows Forms User Control as an MFC Dialog Box

Concepts

Windows Forms/MFC Programming Differences

Other Resources

Using a Windows Forms User Control in MFC

Hosting a Windows Forms User Control as an MFC View