The first version of the Object Windows Library, introduced in Borland C++ 3.1, used Dynamic Dispatch Virtual Tables (DDVT), a proprietary non-portable extension to C++, to "magically" dispatch the various Windows messages to assigned handlers. A DDVT entry looked like this:
virtual void HandleListBoxMsg(TMessage& Msg) = [ID_FIRST + ID_LISTBOX];
In OWL 2 and later versions, DDVT was replaced by response table macros based on plain C++. A response table entry looks like this:
EV_LBN_SELCHANGE(ID_LISTBOX, LbnSelChange),
Another change was the move from containers using an object-oriented hierarchy to template-based container classes (BIDS).
It is possible to port an OWL 1.0 application to OWLNext with Embarcadero RAD Studio/C++Builder or Microsoft Visual Studio/C++, although in some cases it may be better to redesign and rewrite the user interface from scratch. See Upgrading from OWL for more guidance.
Upgrade the application to OWL 2. This can be done with the help of the OWLCVT utility, which is included in Borland C++ 4. The last version that has OWLCVT included is version 4.53. (While the utility is mentioned in several places in the documentation for Borland C++ 5, it is unfortunately not included in the product package.)
Note that OWLCVT is a very old program that has problems running under modern operation systems. If you encounter errors like "unable to create backup file", a possible solution is to try to run the program on a (virtual) machine running Windows XP or earlier.
OWLCVT usage is covered in detail in the Object Windows Programmer's Guide. Here is how you use it from the Borland C++ 4.5 IDE:
Port your application to 32-bit mode and Win32. Take special care of the usage of int variables, as their size will change.
Discussion: Converting from OWL 1.0 - how clean do I have to be?
Wiki: Migrating_from_BC_to_VC
Wiki: Supported_Compilers
Wiki: Upgrading_from_OWL
I recall that was needed only for Visual C++ 6.0.
Newer versions of Visual C++ should conform to the standard regarding the scope of the for-loop control variable, although I cannot say exactly when did that occur.
Thanks for pointing that out. I thought the comment related to cross-compiler compatibility in general. I'll make it clear.
On the for-loop scope issue — I do remember it now, and I seem to recall it lingered in the Microsoft compiler for longer than I liked, along with other peculiarities. However, latest Microsoft compilers are now wondrously compatible with the latest C++ standards, I am glad to say.
Maybe we can clarify by changing that sentence to "If you plan to port your project to older versions of Visual C++"
I updated the article before I saw your comment. I tried to generalise the bullet point to comprise all language related compatibility issues. Hopefully, it is clear now. However, feel free to make any changes to improve it or other parts of this article, so that we can make the porting process as smooth as possible for users that still have old code they would like to modernise.
Last edit: Vidar Hasfjord 2023-04-25
Nice update, Jogy, about the issue with OWLCVT on modern operating systems. I've improved the formatting and language a little (bold, line breaks, spelling/grammar).
Looks great, thanks!