Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

ISupportInitialize - MC++

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ReMEn - 25 Feb 2005 06:07 GMT
I have derived my own class from a UpDownBase. Like so:

__gc public class MyNumericUpDown : public UpDownBase, ISupportInitialize
{...}

I created my own custom controls using my derived class. I go to build, and
I receive this error:
error C3141: 'System::ComponentModel::ISupportInitialize' : interfaces only
support public inheritance

I tried to add public in front of ISupportInitialize, but when I go to build
I will then get this error:
error C2259: 'MyNumericUpDown' : cannot instantiate abstract class

The above error occurs at the BeginInit() and EndInit() in
InitializeComponent, for my control:
__try_cast<System::ComponentModel::ISupportInitialize *  
>(this->nudPlayerHeight))->BeginInit();

For some reason it will not let the control be initialized!

Anybody have an ideas why I'm getting these build errors?

Thanks,
Tamas Demjen - 01 Mar 2005 22:18 GMT
> I tried to add public in front of ISupportInitialize, but when I go to build
> I will then get this error:
> error C2259: 'MyNumericUpDown' : cannot instantiate abstract class

ISupportInitialize has abstract virtual functions that you must
implement. That's the basic idea behind interfaces. The compiler forces
you to implement an interface, otherwise the class can't be instantiated.

Tom

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.