다음을 통해 공유


CWinFormsView Class

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

class CWinFormsView : public CView;

Members

Public Constructors

Name

Description

CWinFormsView::CWinFormsView

Constructs a CWinFormsView object.

Public Methods

Name

Description

CWinFormsView::GetControl

Retrieves a pointer to the Windows Forms control.

Public Operators

Name

CWinFormsView::operator Control^

Casts a type as a pointer to a Windows Forms control.

Remarks

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 Form User Control in MFC.

Note

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

Note

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

Requirements

Header: afxwinforms.h

See Also

Reference

Hierarchy Chart

CWinFormsControl Class

CWinFormsDialog Class

CFormView Class