I would like to write a very simple custom ActiveX component with one button and one checkbox on it. I will put this ActiveX component into a user form in an Excel macro and I want this ActiveX component to communicate (invoke methods and generate events) with the VBA code that embeds it, based on for example button presses and checkbox changes. I plan to program in C++/MFC and use Microsoft Visual Studio .NET 2003.
I have found some examples on the Internet, but they didn't quite work the way I was expecting and I face the same problem if I let the Visual Studio wizard create the project for me. If I double-click the icon under Dialog in the Resource View, I would expect to see a form which is very similar to what the ActiveX component will look like on the Excel user form. But instead, the form I see in Visual Studio appears to be some sort of property control GUI for the ActiveX component I create. If I, for example in Frontpage or ActiveX Control Test Container, insert the ActiveX component and view the properties of the ActiveX component, I see the form I was hoping would be the ActiveX component itself. I guess it's ok that there is a form for changing properties, but how do I get the real form that will be similar to what shows up in Excel? I am a beginner C++ programmer, please keep that in mind.
I have found some examples on the Internet, but they didn't quite work the way I was expecting and I face the same problem if I let the Visual Studio wizard create the project for me. If I double-click the icon under Dialog in the Resource View, I would expect to see a form which is very similar to what the ActiveX component will look like on the Excel user form. But instead, the form I see in Visual Studio appears to be some sort of property control GUI for the ActiveX component I create. If I, for example in Frontpage or ActiveX Control Test Container, insert the ActiveX component and view the properties of the ActiveX component, I see the form I was hoping would be the ActiveX component itself. I guess it's ok that there is a form for changing properties, but how do I get the real form that will be similar to what shows up in Excel? I am a beginner C++ programmer, please keep that in mind.