Summary

You can do several things in your current VCL-based components to aid in porting them to CLX in the future. First, use existing VCL wrappers wherever possible. For example, use the TCanvas methods instead of calling GDI functions directly. Override existing event dispatch methods such as MouseDown() instead of handling the wm_LButtonDown window message. Linux doesn't use messages; therefore, the wm_LButtonDown message doesn't even exist under Linux. Another helpful technique is to create your own abstraction classes to help isolate platform dependent code.

Although CLX was modeled after the VCL, migrating your existing VCL components to CLX will definitely require some effort. Platform specific calls such as calls to the Win32 API or ...

Get Borland® Delphi™ 6 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.