Board index » cppbuilder » need advice on upgrading to C++ Builder

need advice on upgrading to C++ Builder

Hi all

Not exactly sure where I should ask this, so sorry if wrong group but it
does relate to C++ Builder.

I have a project that currently runs on Borland C++ 4.5 16 bit.
There are nearly 600 files and 44.5MB of data in the project.  The project
currently uses windows dialog boxes to display the data.

The RC files use elements from Borland Visual Solutions Pack 1.1 . This
includes a formula one spreadsheet (VTSS.VBX). The RC files can be convert
to 32 bit res files using BCR32.exe.

The project has numerous low level warnings, mainly related to windows
dialog boxes and pointers.

The users interface consists mainly of spreadsheets, list boxes and gauges
representing speed and temperature. (Yes, I work for a car engineering
company).  The interface is quite small and consists of several windows and
selection boxes.

I have been asked to upgrade it to 32 bit.

When I try and run the program as 32 bits, I get numerous error messages
relating to the VTSS.h file. This must be a 16 bit file only.

Going to 32 bits will create more errors as the project was created in 1995
and has received little in the way of upgrades.

Now do I s{*word*99} the current interface (and RC files) and create one using
forms in C++ Builder and get rid of the windows dialog boxes or keep the
current format and try and upgrade the spreadsheet controls?

I am looking for the easiest option ad I have only been doing programming
for 4 months which is a mixture of C, C++ and widows programming.  I have
had a 6 month course in C and C++ prior to this.

Thanks for any advice
Steve

 

Re:need advice on upgrading to C++ Builder


Quote
> Now do I s{*word*99} the current interface (and RC files) and create one using
> forms in C++ Builder and get rid of the windows dialog boxes or keep the
> current format and try and upgrade the spreadsheet controls?

I'm in the midst of porting a 16bit app and I think the easiest and most
flexible way is to just rewrite the interface in BCB, and use the 'guts'
of the code inside events. 16 bit Windows source code is just different
enough from 32 bit that doing it any other way is asking for trouble.

Quote
> I am looking for the easiest option ad I have only been doing programming
> for 4 months which is a mixture of C, C++ and widows programming.  I have
> had a 6 month course in C and C++ prior to this.

And you're working on porting a 600 file, 44mb program? I hate to be a
downer, but it ain't gonna happen.

+=====================================================+
| Jonathan Arnold (mailto:jdarn...@buddydog.org)      |
|         Comprehensive C++Builder link site:         |
| http://www.buddydog.org/C++Builder/c++builder.html  |
+=====================================================+

Re:need advice on upgrading to C++ Builder


Quote
"Steven Hodgson" <stev...@advancedengine.com> writes:
> Hi all

> Not exactly sure where I should ask this, so sorry if wrong group but it
> does relate to C++ Builder.

> I have a project that currently runs on Borland C++ 4.5 16 bit.
> There are nearly 600 files and 44.5MB of data in the project.  The project
> currently uses windows dialog boxes to display the data.

This is quite an undertaking.  How much effort went into the original
code to make it portable in the first place?  For example, are all the
types used through typedefs, or are they hardcoded in your application
across all 600 files?  In moving from 16 bit to 32 bit platforms, the
sizeof(int) has doubled, and the valid ranges are different.  Will
that affect your code?  (With that many lines of code, the odds are
you'll have those kinds of bugs in addition to other (windows)
changes.)

Further, the language of C++ has gone through the standardization
process, and today's C++ is different than it was 5 years ago.  You
may find that some code that used to be correct isn't anymore.

As for how to approach this, I really don't feel qualified to give
advice, especially with the interface, since I've never used formula 1
controls, nor have I ported 16-bit guis to 32 bit platforms.

Try not to get overwhelmed with porting issues.  You have a HUGE job
ahead.  Remember to make use of this newsgroup for specific questions,
and we'll try to help.  (I'm usually most active in the .language
group, if you have C++ questions.  For GUI questions, post in the .vcl
group for the best level of competance seeing your question.)

Good luck.  

--
Chris (TeamB);

Re:need advice on upgrading to C++ Builder


I don't know anything about formula 1, so I can't comment on it, but I have
gone from 16-bit to 32-bit, and I've gone from WinAPI to VCL. However, I
haven't gone directly from 16-bit to VCL. I can tell you that going from
16-bit to 32-bit is a hassle, especially if it wasn't planned for. Even if
it was, there are still a number of windows messages in which parameters
changed, as well as functions that became obsolete. After you get your code
compiled, which will take a while, you'll have to test it and find all of
the windows things that have changed. There used to be a Microsoft article
about this, and there may be some info in the MS help files (win32.hlp?)
about what to look out for. I'd try searching the MSDN site for info about
porting from 16 to 32-bit.

Migrating to VCL is another story. It is possible to take your plain old
windows app and compile in Builder, without using VCL. However, it must be
32-bit -- Builder doesn't do 16-bit. If you want to use the VCL, then I
suggest doing a complete rewrite. You can port your 32-bit app and get it
running outside the VCL, but then you're giving up all of the benefits of
using Builder, and so you might as well just use the free C++ compiler
instead. I think Builder is an excellent environment to work in, especially
if you have to deal with a lot of dialogs and controls and whatnot. It does
have some shortcomings, which you'll find out about by reading some of the
posts in this group, but having done Windows programming from BC1.0 all the
way up to Builder 5, I can tell you I much prefer working in Builder.

That said, my opinion is that porting to 32-bit without going to VCL will
probably be the faster solution for you. 600 files is a huge app, and
porting will be a heavy undertaking, but rewriting all that code from the
ground up will surely take longer. If your interface is minimal and is the
windows part of it is well contained, and if it's written indepenedent of
16/32 bit issues like the size of the int, then porting won't be so bad. If
any of those things are not true, then you could have a *lot* of work on
your hands. Also, it sounds like you may have a problem with the formula 1
code, so you'll have to determine first if it can even be used as 32-bit.

And don't take this the wrong way, but I remember what I was doing after 6
months or even a year of experience, and I have to say I was still pretty
green. I can't imagine myself taking a task like the one you've just
described. I think you should seriously consider bringing in someone with a
lot more experience, if for nothing else then at least to assess your
situation and determine the best way to go.

    - Bill
--
----------------------------------------------------------------
Bill Zitomer
R.I. Soft Systems - http://www.risoftsystems.com
ScreenSaver.com - http://www.screensaver.com
Screen Greetings - http://www.screengreetings.com
Virus Myths - http://www.vmyths.com

Quote
"Steven Hodgson" <stev...@advancedengine.com> wrote in message

news:3a948698_1@dnews...
Quote
> Hi all

> Not exactly sure where I should ask this, so sorry if wrong group but it
> does relate to C++ Builder.

> I have a project that currently runs on Borland C++ 4.5 16 bit.
> There are nearly 600 files and 44.5MB of data in the project.  The project
> currently uses windows dialog boxes to display the data.

<snip>

Re:need advice on upgrading to C++ Builder


For what its worth.
I get many projects to port OWL / C 16bit code to Latest Version.
I have used every tool available and many of my own.
The best solution is always as others have suggested.
Use the 16 bit code as a "template" for the new Version and start from
scratch. Not using the 16 bit code itself, only the conceptual design(that
likely needs updating anyway).

Yes it will take longer.
However, the code will be correct. and you will learn a grate deal.

Regards
--
Michael Harris

Re:need advice on upgrading to C++ Builder


Thanks for the info.
I agree the lack of experiance is a draw back.

On the bright side I gave the number and size of files for everything in the
directory.
There are actually only 109 file (*.rc, *.c, *.h, *.bmp) totaling 6.48MB,
which does sound a lot better.

How ever all your points remain valid.

Thanks
Steve

Other Threads