Click to See Complete Forum and Search --> : ActiveX problem
AndyMitchell
Oct 29th, 2002, 10:50 AM
I am using VC++6 and creating an MFC dialog based application with 1 custom ActiveX. When i insert the ActiveX into the dialog C++ creates a wrapper class for me. If i want to modify the ActiveX itself i will need to recreate this wrapper class. How do i do this? If it cannot be recreated what is the best way to remove and re-insert the ActiveX into the project. I have tried removing it from the dialog, deleting the member variable and any references but i get linker errors.
CornedBee
Oct 29th, 2002, 01:39 PM
There's nothing the wizard can do you cannot. If you learn how an ActiveX wrapper class is structured you can write one yourself with ease. But why do you have to replace the class only because you edited the ActiveX?
AndyMitchell
Oct 30th, 2002, 03:56 AM
When you make any changes to the activeX the ID numbers used in the InvokeHelper call are regenerated. To do it manually means using the COM viewer and noting down all the method ID's and re-entering them into the class. This would take a lot of time and is very easy to make a mistake. At the top of the VC generated class there is a comment saying '/ NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
' This implies that VC should regenerate this class for you.
InvokeHelper(0x6003001a , DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms,
Movecard, TimeOut);
CornedBee
Oct 30th, 2002, 09:22 AM
Yes, it does seem so.
Sorry, don't know how.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.