views:

283

answers:

4

In visual studio 2008 I can create an MFC activex project and it presents a wizard to create a single activex control. I now want to create new controls within this project.

I can't find any way to do this.

A: 

Menu->Project->Add Class->now add an empty MFC active x control class...

kiddo
This allows me to add an "MFC Class From ActiveX Control" but this I don't want to USE an active x control I want to develop a new one in my project.
David
+1  A: 

Each project in Visual Studio 2008 can only have one output (EXE, DLL etc.). If you want several outputs, create a solution. The solution wil contain your existing projects. And you can create additional projects, e.g. for an ActiveX control

The projects in a solution can share code, use the same settings cand configuration, and they can be built together.

(Don't you happend to already have a solution? I thought that Visual Studio 2008 always creates a solution, even for single projects.)

Codo
I don't think that's the issue here. A single .OCX file (and thus, a single project) can have more that one ActiveX control.
djeidot
A: 

I couldn't find a way to do it either.

In VC6 you can specify how many ActiveX controls you want in your (new) project. Maybe you can build the project in VC6 and port it to VC2008.

Otherwise, my best guess is that you duplicate the code of your current ActiveX control. Create two "Ctrl" and "PropPage" classes similar to the ones of the current control, then duplicate the headers in the .odl/.idl file. If it's done right, the new control will appear in Class View and you can add methods, properties and events.

djeidot