Partager via


CWinFormsView::CWinFormsView

Constructs a CWinFormsView object.

CWinFormsView(
   System::Type^ pManagedViewType
);

Parameters

  • pManagedViewType
    A pointer to the data type of the Windows Forms user control. For more information, see Type.

Example

In the following example, the CUserView class inherits from CWinFormsView and passes the type of UserControl1 to the CWinFormsView constructor. UserControl1 is a custom-built control in ControlLibrary1.dll.

class CMyView : public CWinFormsView
IMPLEMENT_DYNCREATE(CMyView, CWinFormsView)

BEGIN_MESSAGE_MAP(CMyView, CWinFormsView)
END_MESSAGE_MAP()

CMyView::CMyView()
   : CWinFormsView(ControlLibrary1::UserControl1::typeid)
{
}

Requirements

Header: afxwinforms.h

See Also

Reference

CWinFormsView Class