C++ MFC

Moderators: Lundin
Number of threads: 3354
Number of posts: 9032

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Problem related to activex control Posted by Shivani on 10 Jul 2003 at 1:51 AM
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.
Report
Re: Problem related to activex control Posted by stober on 10 Jul 2003 at 4:22 AM
: 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.

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.


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

Report
Re: Problem related to activex control Posted by Shivani on 10 Jul 2003 at 5:04 AM
This message was edited by Shivani at 2003-7-10 5:5:35

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.




Report
Re: Problem related to activex control Posted by stober on 10 Jul 2003 at 6:46 AM
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.
Report
Re: Problem related to activex control Posted by Shivani on 10 Jul 2003 at 9:47 PM

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 .
Report
Re: Problem related to activex control Posted by stober on 11 Jul 2003 at 4:50 AM
:
: 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 .
:

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.
Report
Re: Problem related to activex control Posted by Shivani on 11 Jul 2003 at 5:10 AM

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.

Report
Re: Problem related to activex control Posted by francisamalan on 16 Jul 2003 at 2:57 AM
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.
:
: 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.
:
:
: : Another question : Do i have to again include buttons in my dialog box since i have made changes in my button active x control.
: :
: I don't understand the question
:
:

Report
Re: Problem related to activex control Posted by Shivani on 17 Jul 2003 at 5:03 AM
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.
: :
: : 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.
: :
: :
: : : Another question : Do i have to again include buttons in my dialog box since i have made changes in my button active x control.
: : :
: : I don't understand the question
: :
: :
:
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.