Export (0) Print
Expand All
0 out of 3 rated this helpful - Rate this topic

CWinFormsControl Class 

Provides the basic functionality for hosting of a Windows Forms control.


template<class TManagedControl>
class CWinFormsControl : public CWnd

Parameters

TManagedControl

A .NET Framework Windows Forms control to be displayed in the MFC application.

The CWinFormsControl class provides the basic functionality for hosting of a Windows Forms control.

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

Your MFC code should not cache Window handles (usually stored in m_hWnd). Some Windows Forms control properties require that the underlying Win32 Window be destroyed and recreated using DestroyWindow and CreateWindow. The MFC Windows Forms implementation handles the Destroy and Create events of the controls to update the m_hWnd member.

NoteNote

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

Header: afxwinforms.h

This class is not supported in Smart Device projects.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.