3

What is the difference between an .OCX file created in MFC or VB and a .Net control created in C#?

  1. Is it possible to use the .Net Control in a MFC application?

  2. I have a dialog in C# I need to use the same dialog in MFC.whether can I import the entire dialog into Mfc ,or can i save my C# application as .OCX file and use it in MFC?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
subbu
  • 3,229
  • 13
  • 49
  • 70

1 Answers1

3

The main difference: .ocx is unmanaged because MFC is unmanaged, .NET controls are managed (if you don't try to use MFC in .NET, or other unmanaged stuff).

I think you can't save your .NET app as .ocx file, at least there is no standard way to do this, but you can still use .NET controls in C++ because they can be registered for COM interop.

Bogdan Verbenets
  • 25,686
  • 13
  • 66
  • 119