Page 1 of 2
Unicode Support to Dialogs from Resources
Posted: Tue Sep 29, 2015 8:39 am
by RAMESHBABU
Dear Mr.Antonio,
I was testing Unicode support from our FiveWin. All seems to be working ok
to the extent of Unicode implemented sofar upto FWH_1509.
But one thing i noticed is that the text from Dialogs in R.C are not being
converted.
viewtopic.php?f=3&t=31392
free image hostMy I request you to look into this when you find time.
Regards,
-Ramesh Babu P
Re: Unicode Support to Dialogs from Resources
Posted: Tue Sep 29, 2015 2:16 pm
by Antonio Linares
Dear Ramesh,
Could you please test it again doing oDlg:lTransparent := .T. before the ACTIVATE DIALOG ?
Please post the resulting screenshot here.
Many thanks
Re: Unicode Support to Dialogs from Resources
Posted: Tue Sep 29, 2015 4:44 pm
by Antonio Linares
Ramesh,
Are those dialogs from a RC file ?
If so, could you please post here the RC file or send it to my email ?
thanks
Re: Unicode Support to Dialogs from Resources
Posted: Wed Sep 30, 2015 5:21 am
by richard-service
Antonio Linares wrote:Ramesh,
Are those dialogs from a RC file ?
If so, could you please post here the RC file or send it to my email ?
thanks
Antonio,
I make this sample, PRG and RC that I convert to UTF-8 style.
http://www.fivetech.com.tw/downloads/TestChinese-u8-V3.rarCode: Select all | Expand
// Add this to your resources RC file
#ifdef __FLAT__
1 24 "./WinXP/WindowsXP.Manifest"
#endif
new BITMAP "./bitmaps/32x32/new.bmp"
quit BITMAP "./bitmaps/32x32/quit.bmp"
TEST DIALOG 20, 41, 356, 86
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "測試 Unicode 繁體中文(Traditional Chinese)-例如堃,叙"
FONT 12, "細明體"
{
EDITTEXT 201, 68, 7, 170, 12
EDITTEXT 202, 68, 22, 99, 12
CONTROL "存檔", 301, "BUTTON", BS_USERBUTTON | WS_TABSTOP, 302, 8, 46, 18
CONTROL "取消", 302, "BUTTON", BS_USERBUTTON | WS_TABSTOP, 302, 29, 46, 18
CONTROL "列印", 303, "BUTTON", BS_USERBUTTON | WS_TABSTOP, 302, 50, 46, 18
LTEXT "中文地址", 101, 5, 7, 60, 12
LTEXT "中文姓名", 102, 5, 22, 60, 12
}
Re: Unicode Support to Dialogs from Resources
Posted: Wed Sep 30, 2015 8:34 am
by Antonio Linares
Re: Unicode Support to Dialogs from Resources
Posted: Wed Sep 30, 2015 11:00 am
by cnavarro
Look

Re: Unicode Support to Dialogs from Resources
Posted: Wed Sep 30, 2015 11:11 am
by Antonio Linares
Dear Cristobal,
Please explain the changes in buildh.bat, many thanks!

Re: Unicode Support to Dialogs from Resources
Posted: Wed Sep 30, 2015 11:13 am
by cnavarro
Antonio
I've sent an email
Re: Unicode Support to Dialogs from Resources
Posted: Wed Sep 30, 2015 11:23 am
by Antonio Linares
Ok, as explained by Cristobal to me, Windows does not support UTF8. Only Unicode.
So you have to open the RC file with notepad.exe and
save it with Unicode format.
Cristobal, thanks for the finding

And don't forget to add this at the beginning of your PRG:
FW_SetUnicode( .T. )
Re: Unicode Support to Dialogs from Resources
Posted: Wed Sep 30, 2015 11:27 am
by Antonio Linares
And it seems as brc32.exe can not be used, instead we have to use cgrc.exe from Embarcadero.
In buildh.bat this change is needed:
Instead of:
IF EXIST %1.rc %bcdir%\bin\brc32.exe -r -I%bcdir%\include -I%bcdir%\include\windows\sdk %1
We must use:
IF EXIST %1.rc %bcdir%\bin\cgrc.exe -r -m -I%bcdir%\include -I%bcdir%\include\windows\sdk %1
Re: Unicode Support to Dialogs from Resources
Posted: Wed Sep 30, 2015 12:12 pm
by Antonio Linares
As Embarcadero does not allow the redistribution of these (free) tools, if you are interested
about using cgrc.exe please send me a gmail account if you want to receive the instructions about how to download the software
from Embarcadero and where this tool is located
Re: Unicode Support to Dialogs from Resources
Posted: Wed Sep 30, 2015 12:31 pm
by RAMESHBABU
Dear Mr.Antinio,
I am extremely happy for that I could
get the Unicode resource dialogs shown
properly with unicode characters, with
your great help.
cgrc.exe and saving the .rc file with in
unicode format has done the magic.
windows 7 print screenThank you very much to you and Mr.Cristobal
Regards,
-Ramesh Babu P
Re: Unicode Support to Dialogs from Resources
Posted: Thu Oct 01, 2015 2:33 am
by dutch
Dear Antonio,
I do interest too, thank you in advance.
dutchez4 @ gmail.com
Antonio Linares wrote:As Embarcadero does not allow the redistribution of these (free) tools, if you are interested
about using cgrc.exe please send me a gmail account if you want to receive the instructions about how to download the software
from Embarcadero and where this tool is located
Re: Unicode Support to Dialogs from Resources
Posted: Thu Oct 01, 2015 5:23 am
by richard-service
Dear Antonio,
1.Resource Dialog not work. I can't input Chinese word and number into TGet.
2.ToolTip display Garbled.

Re: Unicode Support to Dialogs from Resources
Posted: Thu Oct 01, 2015 6:32 am
by RAMESHBABU
Hello Mr.Richard
The dialog what I have shown above is generated using your source only.
Plz. follow the instructions give by Mr.Antonio. I reiterate them once again
for you.
A) In the begenning of you main program, you have to write
FW_SetUnicode(.T.)B) You plase copy your .RC file contents into notepad and save it as
"unicode" not
"UTF-8"C) Copy cgrc.exe into BCC7\BIN or BCC582\BIN
D) In Buildx.bat say :
Code: Select all | Expand
rem IF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include %1
IF EXIST %1.rc %bcdir%\bin\cgrc -r -m -ipath%bcdir%\include %1
E) Just compile and link it. You will get the .EXE properly built and working with UNICODE support.
In case you need the .EXE generated from your own code you gave me, plz. write to my private mail.
I will send it to you.
Thats all
Regards,
-Ramesh Babu