C++ MFC ActiveX / VB Newbie question 
Author Message
 C++ MFC ActiveX / VB Newbie question

Hi Folks,

I haven't been building ActiveX controls with C++ for use in VB before. If I
just do the following (using VS.NET 2003):

1. Start a new project (C++ MFC ActiveX Control Template)
2. Right click the class in the Class Explorer and Add Function to add a
simple function like:

public int TestMethod(int InputValue);

3. Implement the function as:

return InputValue + 1;

4. Build the project.

If I add the component to the toolbox in VB and insert it on a form, the
Function I've added is not visible. Only the AboutBox method is present. If
I manually edit the IDL file and add something like:

[id(1)] int TestMethod(int InputValue);

the function then appears in VB but if it is called, it returns "Object does
not support this property or method".

Clearly there's some basic step I'm missing.

Any hints would be appreciated.

TIA,

Greg Low



Thu, 04 Aug 2005 18:01:14 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Calling VB ActiveX DLL from MFC applications(Newbie question)

2. Question: Catching errors from a VB ActiveX control in Visual C++ using MFC

3. newbie question - VB ActiveX DLL calling

4. MFC/C++/ActiveX/VB interop

5. Show modeless form in VB ActiveX DLL from C++ MFC DLL

6. Newbie Question: How to use VB data types in C++

7. Newbie Question: How to use VB data types in C++

8. ActiveX C++ using ActiveX VB

9. accessing objects in a c++ DLL from a c++ activeX control placed in a VB application

10. accessing objects in a c++ DLL from a c++ activeX control placed in a VB application

11. Newbie question on ActiveX creating ActiveX

 

 
Powered by phpBB® Forum Software