Now I've asked this question before, but nothing happened about it - but it's needed now.
The IWB editor will not accept Non English characters (here I'm specifically talking about Greek).
So if I want a button / static to say something in Greek I can't type it in.
Ebasic did allow it.
Answers / suggestions / ideas / help please!! ???
Andy.
The help file has some info about the SETFONT command and foreign character sets, including GREEK_CHARSET = 0x00A10000
Don't know how it all works, though
Brian
This is the only way I can think of it:
$INCLUDE "windowssdk.inc"
CONST BUTTON_1 = 1
WINDOW w1
OPENWINDOW w1,0,0,600,400,@MINBOX|@MAXBOX|@SIZE,NULL,"Simple Window",&w1_handler
'CONTROL w1,@SYSBUTTON,"Button1",129,93,150,20,0x50000000,BUTTON_1
CreateWindowW(L"BUTTON", L"Button1", WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_CENTER, 129,93,150,20, w1.hwnd, BUTTON_1, GetModuleHandle(0), 0)
SetWindowTextW(GetDlgItem(w1.hwnd, BUTTON_1), GetMyButtonText(16))
' main loop
WAITUNTIL w1 = 0
END
' window procedure
SUB w1_handler
SELECT @MESSAGE
CASE @IDCREATE
CENTERWINDOW w1
CASE @IDCLOSEWINDOW
CLOSEWINDOW w1
CASE @IDCONTROL
SELECT @CONTROLID
CASE BUTTON_1
IF @NOTIFYCODE = 0
/*button clicked*/
MESSAGEBOX(W1,"Button click","hello",@MB_ICONINFORMATION | @MB_OK)
ENDIF
ENDSELECT
ENDSELECT
ENDSUB
SUB GetMyButtonText(INT textLen), WSTRING
wstring text = L""
pointer p = &text + 0
INT j, a
FOR j = 1 TO textLen
GETDATA MYBUTTONTEXT,a
*<char>p = a
p+=1
NEXT j
RETURN text
ENDSUB
DATABEGIN MYBUTTONTEXT
DATA 167, 3, 177, 3, 175, 3, 193, 3, 181, 3, 196, 3, 181, 3, 0, 0 ' unicode bytes for hello or something like that) in greek
DATAEND
Fasecero,
That gives me ideas, thanks for that.
Where did you find the data values?
DATABEGIN MYBUTTONTEXT
DATA 167, 3, 177, 3, 175, 3, 193, 3, 181, 3, 196, 3, 181, 3, 0, 0 ' unicode bytes for hello or something like that) in greek
DATAEND
Andy.
This is the magic program, should have guessed Fasecero wrote it!
http://www.ionicwind.com/forums/index.php?topic=6096.msg44833#msg44833
Simply run it, paste in a word, and it gives you the wstring which you can use to display the unicode text with the example program Fasecero has posted here.
Date and Time are shown attached.
Thanks,
Andy.
Andy,
There are several websites with the ASCII values you need. Think these links to CodePages cover your needs:
Ascii table for Greek charset (CP869):
https://www.google.no/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwjsr93yu93cAhXKPFAKHTujAqUQFjAAegQIABAB&url=https%3A%2F%2Fwww.ascii-codes.com%2Fcp869.html&usg=AOvVaw11GCj3fThUEfgD8Lz8lO6i
(https://www.google.no/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwjsr93yu93cAhXKPFAKHTujAqUQFjAAegQIABAB&url=https%3A%2F%2Fwww.ascii-codes.com%2Fcp869.html&usg=AOvVaw11GCj3fThUEfgD8Lz8lO6i)
Ascii table for Greek charset (CP737):
https://www.google.no/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwjsr93yu93cAhXKPFAKHTujAqUQFjACegQICRAC&url=http%3A%2F%2Fwww.aut.teihal.gr%2Fe_class%2FOop%2FASCII%2520CODES.pdf&usg=AOvVaw0p4WnoZ0vMhHjPJkkmPsSX
(https://www.google.no/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwjsr93yu93cAhXKPFAKHTujAqUQFjACegQICRAC&url=http%3A%2F%2Fwww.aut.teihal.gr%2Fe_class%2FOop%2FASCII%2520CODES.pdf&usg=AOvVaw0p4WnoZ0vMhHjPJkkmPsSX)
Good luck!
Egil
PS
You posted while I was still writing....
Thanks Egil,
I will check them out, glad to see you back from hospital!!!
Andy.
Quoteglad to see you back from hospital!!!
Thanks Andy,
I'm going back the 27th. But this time I'll stay at an hotel next to the hospital with a very fast WiFi, so I won't feel so isolated as with my former visits. Four weeks whithout web connection almost kills me slowly, so when I discoverred the new arrangement you know what I chose...
Egil