Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2006 Mar : Form captions in DLL - behaviour changed between D6 and D2006
| Subject: | Form captions in DLL - behaviour changed between D6 and D2006 |
| Posted by: | "Chris Morgan" (chris.nospam at lynxinfo.co.uk) |
| Date: | Tue, 7 Mar 2006 18:05:48 |
Hi,
I've been puzzling over this for a couple of days now.
I have a Delphi DLL which acts as a COM-plugin for ESRI Arcmap.
The Delphi 6 version works fine.
With the EXACT SAME CODE compiled in Delphi 2006, captions of
all Delphi-created forms are printed as small squares (unprintable
characters?)
if read from DFM, or truncated after the 1st character
if set in code.
This even affects ShowMessage('Hello') calls.
It is only apparent in Win XP 'classic' mode - if I switch
to teletubby mode the captions display OK.
It seems to be something to do with unicode.
The main window of the application EXE is a unicode window,
and IsWindowUnicode(App.hwnd) returns TRUE in both D6 and D2006.
In Delphi 6, IsWindowUnicode returns false for forms I create.
In Delphi 2006, IsWindowUnicode returns true for forms I create.
Any ideas how I can fix the D2006 behaviour so it correctly
sets widestring form captions, or return to the D6 behaviour
which creates ANSI windows?
I've uploaded an image of a ShowMessage window to the
attachments newsgroup which illustrates the problem.
Cheers,
Chris