I am having trouble converting text within an edit box to a WideChar. This is being used in code for printing emoji characters.
If I manually set the WideChar values like the following it works
Emoji[1] := WideChar($D83D);
Emoji[2] := WideChar($DC4D);
But I want to be able to set the hex codes via edit boxes as follows
StringToWideChar(edit1.text, @wc1, Length(edit1.text));
StringToWideChar(edit2.text, @wc2, Length(edit2.text));
Emoji[1] := wc1;
Emoji[2] := wc2;
wc1 and wc2 are defined as WideChar. The edit boxes contain the same values as are hard coded above. That code results in a blank output, so something is wrong with the conversion.
What am I doing wrong? Thanks for any help here.