Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CWinFormsView Class

Provides generic functionality for hosting of a Windows Forms control as an MFC view.

class CWinFormsView : public CView;

MFC uses the CWinFormsView class to host a .NET Framework Windows Forms control within an MFC view. The control is a child of the native view and occupies the entire client area of the MFC view. The result is similar to a CFormView view, allowing you to take advantage of the Windows Forms designer and run time to create rich form-based views.

For more information on using Windows Forms, see Using a Windows Forms User Control in MFC.


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


CWinFormsView does not support the MFC splitter window (CSplitterWnd Class). Currently only the Windows Forms Splitter control (Splitter) is supported.

Header: afxwinforms.h

Community Additions

© 2015 Microsoft