source: cprs/branches/tmg-cprs/TMG_Extra/tntUniCode/Readme.txt

Last change on this file was 672, checked in by Kevin Toppenberg, 11 years ago

Adding source to tntControls for compilation

File size: 5.6 KB
1  ** Tnt Delphi UNICODE Controls Project **
6These controls are provided as-is, with no implied warranty.  They are freely available for you to use in your own projects.  Please let me know if you have found them helpful.  Also, please let me know if you find any bugs or other areas of needed improvement.
9---Delphi Installation--------------------------
11The most simple way to install these components is by opening the appropriate design package in Delphi and clicking on the big "Install" button.  For instance, Delphi 5's design package is TntUnicodeVcl_D50.dpk.
13For BCB 2006 and newer, open the appropriate design package in the packages\bcbx\ folder using the Delphi personality.  After compiling and installing, you should be able to use the components in both the Delphi and BCB personality.  Remember to set the library path in menu "Tools->Options" for both the C++ Builder and the Delphi.
16---A note on fonts----------------------
18The default TFont uses "MS Sans Serif" which doesn't work well with most non-ANSI characters.  I'd recommend using a TrueType font such as "Tahoma" if it is installed on the machine.  To make TFont use a different font like "Tahoma" add this to the first line in the project:
20  Graphics.DefFontData.Name := 'Tahoma';
22You might have to include "Graphics" in the file's uses clauses.  Furthermore, adding this line of code to the project will cause the changed setting to only be applied at runtime, not at design time.  To make a designtime change, you'd have to add this line to the initialization section of a unit in a design package.
24Regarding the IDE, I use GExperts to change the font of the Object Inspector.  The Wide String List editor uses the font used by the object inspector.
26Also keep in mind that the font used by certain message boxes come from that set by Windows' Display properties.
31Designing software for an international audience, I've always wanted to write a full UNICODE application.  My approach so far, has been to write Unicode on the inside, and MBCS on the outside.  This has always been frustrating, because (even on Windows NT/2000/XP which provide native Unicode window controls) the WideStrings inside my application and databases were always confined to an ANSI VCL.  And, since the VCL was designed to wrap the low-level Windows details, why shouldn't the VCL hide the fact that sometimes native Unicode controls are not possible on the given version of Windows.  I believe the VCL should be written with a Unicode interface, even if it must (at times) deal with an ANSI operating system.  For example, TEdit should expose Text as a WideString, even if it has to convert the WideString to an AnsiString on the Windows 9X platform.
33In the past, the ANSI VCL may have made a little sense, considering that there were many more users of Windows 9X, than Windows NT.  There would have been some performance penalty to use WideStrings on the Windows 9X platform.  But with the faster computers of today, and with more people using platforms such as Windows 2000 and Windows XP, the ANSI VCL just doesn't make sense anymore.  In fact, having to use the the ANSI VCL on Windows NT/2000/XP is slower because of the constant conversion to and from UNICODE inside Windows.
35My coding signature is Tnt.  I will use this to denote my classes from others.
37For more information about me: <>
38Some of my software projects (all written in Delphi).
39    TntMPD (contact manager for missionaries)
40      <>
41    Jesus Film Screen Saver
42      <>
43    ActiveX SCR control
44      <>
46---Design Goals----------------------------
48I want the controls to work on Windows 95, 98, ME, NT, 2000, XP, etc.  I want a single EXE for all platforms.  Of course, full UNICODE support is only truly available on NT/2000/XP.  In other words, the controls should automatically scale to take advantage of native Unicode support when possible.
50I want the controls to inherit from the Delphi VCL.  I want to reuse as much code as possible.  For the most part this makes sense.  The only sticky part is where text messages get passed around.  But I believe I've gotten past this through strategic subclassing at various points in the message flow chain.  To give a rough comparison of why this is so important, check out the following chart which compares the lines of code in the VCL for a given control (4,397 in all), and the lines of code required in my descendent controls (655 in all).  Besides saving lines of code, I get the advantage of automatically inheriting new features as new versions of Delphi come out.  One such example is the AlphaBlending feature in the Delphi 6 TForm.  Even though I use Delphi 5 now, I won't have to add any code to get this new feature.
52---More Interesting Information----------------------------
53Case Study: Porting an MFC Application to Unicode:  It looks like the FrontPage 2002 team did the roughly the same thing to MFC as what I'm doing to the VCL.  They did this with the same goal in mind: to support Unicode as much as possible depending on the support offered by Windows.  Another goal was "Don’t abandon MFC; don’t rewrite app".  Because they still want to support Windows 9X using the same worldwide EXE used everywhere.  They couldn't just compile with the _UNICODE directive.  They had to start with the ANSI MFC, strategically subclassing window procedures at just the right places.  Hmmm... sounds familiar.
Note: See TracBrowser for help on using the repository browser.