Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TColorButton Component

330 views
Skip to first unread message

Nate

unread,
Jan 16, 2008, 11:43:28 AM1/16/08
to

I have a text file of Delphi code to create a TColorButton component that is a descendant of TButton. I use CodeGear Rad Studio C++ and don't understand enough Delphi or component creation to convert this to C++. I can post the code, it's not too large, if anyone can help me.

Thanks

Remy Lebeau (TeamB)

unread,
Jan 16, 2008, 2:30:46 PM1/16/08
to

"Nate" <RNLoc...@gmail.com> wrote in message
news:478e4240$1...@newsgroups.borland.com...

> I have a text file of Delphi code to create a TColorButton component that
> is a descendant of TButton. I use CodeGear Rad Studio C++ and don't
> understand enough Delphi or component creation to convert this to C++.

Why convert it at all? C++Builder can use Delphi-written components.


Gambit


Nate

unread,
Jan 16, 2008, 4:00:47 PM1/16/08
to

"Remy Lebeau \(TeamB\)" <no....@no.spam.com> wrote:
>
>Why convert it at all? C++Builder can use Delphi-written components.
>


I posted a reply earlier but I don't see it so I'm sending it
again. I'm using the web based client.

That's good news (of course it won't help me to learn Delphi).
Do I just add it to a test project in C++ as a .pas file?

Nate

Remy Lebeau (TeamB)

unread,
Jan 16, 2008, 6:32:08 PM1/16/08
to

"Nate" <RNLoc...@gmail.com> wrote in message
news:478e7e8f$1...@newsgroups.borland.com...

> Do I just add it to a test project in C++ as a .pas file?

Yes. C++Builder has a Pascal compiler included for exactly that purpose.


Gambit


Remy Lebeau (TeamB)

unread,
Jan 16, 2008, 6:32:46 PM1/16/08
to

"Remy Lebeau (TeamB)" <no....@no.spam.com> wrote in message
news:478e...@newsgroups.borland.com...

> Yes. C++Builder has a Pascal compiler included for exactly that purpose.

Add the .pas file to a package and then compile just that file. An .hpp
header file will be generated that you can then #include into your C++ code
where needed.


Gambit


Nate

unread,
Jan 16, 2008, 5:55:51 PM1/16/08
to

"Remy Lebeau \(TeamB\)" <no....@no.spam.com> wrote:

>
>Add the .pas file to a package and then compile just that file. An .hpp
header file will be generated that you can then #include into your C++ code
>where needed.
>

I added it to a test project to see what the button looked like and it looks like the pre 2007 buttons with a frame, shadow, etc. I sure wish the code was documented. I've changed Rectangle to RoundRect but have more to do.

Horst Reichert

unread,
Jan 17, 2008, 3:51:07 AM1/17/08
to
You might have a look at my ColorPicker
http://www.rt-science.com/components.html it is free and with source.

Regards Horst


0 new messages