View Full Version : How to display unicode string in ThinBasic controls
Hi all,
I am practicing some ui scripts. I can easily display unicode strings with MsgBoxW function. But I am not able to display unicode text in a Button created by this code.
Control Add Button, hDlg, %bClose, "മലയാളം", %MAIN_WIDTH-105, %MAIN_HEIGHT-30, 100, 25, Call
When running, the button displays some weird signs. How to fix this ?
Petr Schreiber
02-04-2021, 20:58
Hi,
thanks a lot for your question.
I don't think you do anything wrong - thinBASIC is sadly not 100% ready for unicode. It is quite complex topic and more we dive into it, more we learn, but also bigger the task appears.
It can take significant amount of time before unicode works in all the expected cases in thinBasic, my apologies.
Petr
@Petr,
Thanks for the reply. I am planning to create my own gui library in thinBasic.
All i need is a complete list of data types for each win api data type. So far, i 've learned that i can use "Long" data type for LPCSTR.
ReneMiner
03-04-2021, 01:33
@Petr,
Thanks for the reply. I am planning to create my own gui library in thinBasic.
All i need is a complete list of data types for each win api data type. So far, i 've learned that i can use "Long" data type for LPCSTR.
then you might have a use for this: (i fear the site is not much longer available) so i saved it on my pc....
click dah link
Converting C declarations to visual basic (https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa261773(v=vs.60))
just found its still there. hurry before they drop it out
@ReneMiner,
Thanks. MSDN changes links frequently. MSDN links are often found in many different forums like C Board. Clicking on them will get you nowhere.
Currently, I am struck with "IDC_ARROW MAKEINTRESOURCE(32512)".
And this is MAKEINTRESOURCE - "MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))"
How to translate this into thinbasic ?