Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Problem related to activex control

ShivaniShivani Posts: 20Member
I have written an activeX control- button(using VC++).I use this ActiveX control in a VC++ application.Now i made some changes in the active x control say i added one more function abc().I compile it , register it & then include it in my VC++ application. Now wrapper class generated by MFC is not reflecting the added function....which means i can't call abc() function from my application.Why is this happening.
Another question : Do i have to again include buttons in my dialog box since i have made changes in my button active x control.

Comments

  • stoberstober Posts: 9,765Member ✭✭✭
    : I have written an activeX control- button(using VC++).I use this ActiveX control in a VC++ application.Now i made some changes in the active x control say i added one more function abc().I compile it , register it & then include it in my VC++ application. Now wrapper class generated by MFC is not reflecting the added function....which means i can't call abc() function from my application.Why is this happening.

    [blue]you have to add the control to your project again just like you did the first time.That's when the wizzard creates the .h file in your project. Unfortunately there is no way to remove a control from your project, so you might wind up with two of them.[/blue]


    : Another question : Do i have to again include buttons in my dialog box since i have made changes in my button active x control.
    :
    [blue]I don't understand the question[/blue]

  • ShivaniShivani Posts: 20Member
    [b][red]This message was edited by Shivani at 2003-7-10 5:5:35[/red][/b][hr]
    i'm adding the control exactly the way i added it the first time.It creates button.cpp & button.h class. now the problem is the function abc() that i added in my activex control is not reflected in the button.cpp & button.h class. Button.cpp & button.h files are Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ when we add the active x control in the project.
    i'm not ending up with two controls coz i'm manually removing button.cpp & button.h from the project.




  • stoberstober Posts: 9,765Member ✭✭✭
    how did you add the new method to the ActiveX control? You should have used View | ClassWizzard | Automation Tab, then click either the Add Method or the Add Property buttons.
  • ShivaniShivani Posts: 20Member

    Yes exactly the way u mentioned i.e View -> Class wizard -> Automation Tab->Add Method. I think this is the way to add a new method. Is there nything wrong .
  • stoberstober Posts: 9,765Member ✭✭✭
    :
    : Yes exactly the way u mentioned i.e View -> Class wizard -> Automation Tab->Add Method. I think this is the way to add a new method. Is there nything wrong .
    :

    [blue]Just stabbing in the dark now -- try complete recompiling the ActiveX control before adding it again to your continer program. Does it build with no errors and no warnings? You can also use VC++'s container program "Active X Control Test Container" listed under Tools menu. [/blue]
  • ShivaniShivani Posts: 20Member

    I have rebuild it before adding it to my project.On rebuilding it registers the control...i'm also registering it by Active X Control Test Container. Now one more thing which i noticed is that in Active X Control Test Container -> Edit->Insert control. Now the control is inserted for testing purpose.Now on selecting the control i click on Control->Invoke Method.....the method that i have added abc() is not displayed in the Method Name combo box, whereas all other methods are there.Y is this happening.What's going wrong & where.
    Plz help.

  • francisamalanfrancisamalan Posts: 28Member
    Rebuild the whole project & try the same. Sometimes it may work




    : : I have written an activeX control- button(using VC++).I use this ActiveX control in a VC++ application.Now i made some changes in the active x control say i added one more function abc().I compile it , register it & then include it in my VC++ application. Now wrapper class generated by MFC is not reflecting the added function....which means i can't call abc() function from my application.Why is this happening.
    :
    : [blue]you have to add the control to your project again just like you did the first time.That's when the wizzard creates the .h file in your project. Unfortunately there is no way to remove a control from your project, so you might wind up with two of them.[/blue]
    :
    :
    : : Another question : Do i have to again include buttons in my dialog box since i have made changes in my button active x control.
    : :
    : [blue]I don't understand the question[/blue]
    :
    :

  • ShivaniShivani Posts: 20Member
    Rebuilded the project lot many times...but it's not working.I'm stuck & don't know which way to go.


    : Rebuild the whole project & try the same. Sometimes it may work
    :
    :
    :
    :
    : : : I have written an activeX control- button(using VC++).I use this ActiveX control in a VC++ application.Now i made some changes in the active x control say i added one more function abc().I compile it , register it & then include it in my VC++ application. Now wrapper class generated by MFC is not reflecting the added function....which means i can't call abc() function from my application.Why is this happening.
    : :
    : : [blue]you have to add the control to your project again just like you did the first time.That's when the wizzard creates the .h file in your project. Unfortunately there is no way to remove a control from your project, so you might wind up with two of them.[/blue]
    : :
    : :
    : : : Another question : Do i have to again include buttons in my dialog box since i have made changes in my button active x control.
    : : :
    : : [blue]I don't understand the question[/blue]
    : :
    : :
    :
    :

Sign In or Register to comment.