I need to create an application that deals properly with unicode text on Win9x. Windows 98 would be enough at first. As far as I read, Lazarus never supported MSLU (unicows.dll) and has just phased out Windows 98 support recently. Of course this doesn't mean we can't print out Unicode characters in Windows 98 from an application created with Lazarus.
I started experimenting with Lazarus 1.2.6. This is an older version which has an IDE running well on Windows 98 and also the compiled code performs pretty well on the same system. I created a test application that directly calls windows.TextOutW with proper parameters. It did work so it displayed unicode characters on Windows 98 (cyrillic, greek characters), unlike any other function (like DrawText, TextRect, TextOut, etc.). Still without unicows.dll or MSLU!
Okay, now I can custom-draw any unicode text onto the canvas of any widget. However, I want all widgets to do this, without rewriting or sub-classing them (and lose them from the GUI designer).
I had to realize that I need to modify the LCL a bit to be able to do that. So I went on by replacing a TextOut call in TCustomLabel which worked perfectly. All my labels have become unicode under Windows 98. However, this is still not enough. I want all elements, that draw text to any widget, to do it with TextOutW.
So, let's see TLabel. It comes from TCustomLabel that has a Paint function in customlabel.inc. It calls TCanvas.TextRect of the Graphics unit. TCanvas.TextRect creates a virtual rectangle for the text, does some coordinate calculations, then calls DrawText in winapi.inc. It calls WidgetSet.DrawText with the same parameters. Unfortunately, this is the point I gave up messing around in the abyss of LCL. Someone who is experienced enough, please tell me where should I modify the LCL in order to redirect all its wrapped text-drawing calls to TextOutW instead of other WINAPI functions which won't deal with unicode properly on Win9x.
Thanks in advance