I have a custom control written in C# that I would like to port to C++ because it is too slow, and also because I would like to use it in a C++ program as well as C# programs.
I’ve looked at MFC Active X, ATL Active X, and .NET C++. They all seem needlessly complicated. I’d really like to avoid .NET C++ because involving .NET in a C++ program just seems pointless.
Also there don’t seem to be any good tutorials on writing active X controls that aren’t a decade old.
Do you guys know of any decent ActiveX tutorials that target Visual Studio 2008?
Is there any other way that I can accomplish my goals without having to write a COM component. Can I just write a normal control in C++ and stick it in a DLL and have it be usable by both C++ and C# programs? I don’t care about compatibility with GUI form designers.
Thanks!
My original answer was as follows. I will leave it here for people in similar situations.
Based on your comment, I am still concerned that you don’t understand the role that .NET C++ (recently replaced by C++/CLI) plays. I think that might just be the perfect solution for you. It allows you to, say, write an ActiveX control in C++ (which is what I would recommend at this point), and then immediately write a .NET wrapper for it without leaving C++, but instead using a rather large C++ extension.
Yet another addition: Use Visual Studio 2010 if at all possible. C++/CLI is a huge improvement over its predecessors. As for ActiveX, don’t worry if the guides are old. It hasn’t changed much in the past decade.