Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Are you using TwilioX?
Message
From
05/12/2018 16:32:59
 
 
To
05/12/2018 16:25:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Application:
Desktop
Miscellaneous
Thread ID:
01664150
Message ID:
01664178
Views:
52
>If I'm not mistaken, the VFP messagebox() function will stop displaying characters once it hits a CHR(0) (i.e. uses C convention for string terminator).
>When you convert "Hello" to Unicode, the result would be something like
>"H"+CHR(0)+"e"+CHR(0)+"l"+CHR(0)+"l"+CHR(0)+"l"+CHR(0)+"o"+CHR(0)

Correct. You can test it here:
MESSAGEBOX("Test-" + CHR(0) + "--second part")
It only shows "Test-". That's a limitation of Windows, by the way, not VFP. If you use a DECLARE DLL to declare the unicode version, you can use the longer form:
DECLARE INTEGER MessageBoxW IN WIN32API INTEGER hWnd, STRING lpText, STRING lpCaption, INTEGER uType
messageboxw(0, STRCONV("Unicode Text",12), STRCONV("Caption",12), 0)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform