Hi All.
Assuming that I'm modifying an application which
- will run on Win32 and WinCE (handheld device) (X-compilation, 2 targets)
- all string variables have previously been defined as String;
- WinCE (5.?) is UNICODE
Just to make sure that I'm on the right way, do you see someting wrong
in the following sentences:
- all components using text (TLabel, TButton, TEdit, etc) use WideStrings
- I need to convert (using conditional code) from string to WideString
when compiling for WinCE, like
Example:
function ShowSomething(const Msg: string): Boolean; <<<--------
unchanged function definition
var
{$IFDEF WINCE}
wStr: WideString;
{$ELSE}
wStr: String;
{$ENDIF}
begin
result := False;
{$IFDEF WINCE}
wStr := UnicodeString(msg);
{$ELSE}
wStr := msg;
{$ENDIF}
ALabel.Caption := wStr;
// I know, the Caption could be assigned immediately instead of passing
through a variable
// this is just an example
...
Result := True
end;
Thanks for your remarks
Antonio.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus