Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Programming Guide
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:

Want more? Here are some additional resources on this topic:

Visual C++ 
Using a Windows Form User Control in MFC 

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.

NoteNote

MFC Windows Forms integration works only in projects that link dynamically with MFC (projects in which AFXDLL is defined).

NoteNote

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 Programming with Assemblies and Strong Name Assemblies (Assembly Signing).

For sample applications using Windows Forms, see BirthdayPicker Sample: Demonstrates .NET Framework Resources with Windows Forms, Calculator Sample: Windows Forms Pocket Calculator, and Scribble Sample: MDI Drawing Application.

For a sample application that shows Windows Forms used with MFC, see MFC and WinForms Int e gration.

In This Section

Reference

Related Sections

See Also

Concepts

Form Views (MFC)

Other Resources

User Interface

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker