PC Review


Reply
Thread Tools Rate Thread

Derive from existing control in VC++

 
 
Dirk Schippers
Guest
Posts: n/a
 
      14th Dec 2008
I thought this would be easy, but I can't get it to work.
I want to create my custom panel class that inherits from the
System::Windows::Forms::Panel class. I find a lot of examples and
explanations about how to do it in VB and VC#, but not in VC++.

Can anyone help me with this?

My experience with it that whatever I do, create a simple class
inheriting from System::Windows::Forms::Panel or create a User Control
and change its inheritance from System::Windows::Forms::UserControl to
System::Windows::Forms::Panel, I can't seem to add it in the toolbox or
change the design-code manually to make it use my control.

The design mode then gives an error that the control can't be found even
though everything compiles and runs perfectly. Help tells me something
about references that should be added but when I look into the add
references place in the project settings, I can't find my user control
there to add it.

So, it seems to run fine, but the design mode no longer works then,
which is of course not very handy to work with.

Anyone?
 
Reply With Quote
 
 
 
 
Dirk Schippers
Guest
Posts: n/a
 
      15th Dec 2008

> Anyone?

Solved
 
Reply With Quote
 
Jeff Johnson
Guest
Posts: n/a
 
      15th Dec 2008
"Dirk Schippers" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...

>> Anyone?

> Solved


If the solution was simple, could you post it here so that anyone looking
for an answer in the future can benefit?


 
Reply With Quote
 
xcal
Guest
Posts: n/a
 
      15th Dec 2008
sometimes from Csharp you need only to replace

. by :: for namespaces

. for -> for structures, etc,

and to write System.Windows.Forms.Panel instead of only Panel.
If you create your own control, try placing it on a different .h file
and calling it using include.

hope this helps, Carlos

"Jeff Johnson" <(E-Mail Removed)> escribió en el mensaje
news:(E-Mail Removed)...
> "Dirk Schippers" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>
>>> Anyone?

>> Solved

>
> If the solution was simple, could you post it here so that anyone looking
> for an answer in the future can benefit?
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set Custom Control Toolbox icon from existing control? jhardman2006@yahoo.co.nz Microsoft Dot NET Compact Framework 0 30th Oct 2007 09:07 AM
I want to derive a new asp:circlehotspot control - need some help Dean Craig Microsoft ASP .NET 3 13th Nov 2006 11:38 PM
Web User Control with GridView can derive new Web User Control? ABC Microsoft ASP .NET 1 4th Oct 2005 01:29 PM
Web User Control with GridView can derive new Web User Control? ABC Microsoft ASP .NET 0 3rd Oct 2005 11:23 AM
How to custom gridview control if it derive from web user control? ABC Microsoft ASP .NET 0 3rd Oct 2005 11:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:33 PM.