#include "fivewin.ch"
function Main()
local oWnd, oGet, cText := space(20 )
FW_SetUnicode( .T. )
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-25
DEFINE WINDOW oWnd
oWnd:SetFont( oFont )
@ 40,20 GET oGet VAR cText SIZE 300,40 PIXEL OF oWnd
@ 90,20 BUTTON "ฤฆต" SIZE 150,50 PIXEL OF oWnd ;
ACTION MsgInfo( cText )
ACTIVATE WINDOW oWnd CENTERED
return nil
Surasak wrote:My program is ANSI not Unicode. but some THAI characters is display like Unicode.
I found the Font display incorrect when I enter some of 2 THAI character font for example chr(202)+chr(161) , chr(203)+chr(162) , chr(202)+chr(164) etc. , It may be problem from unicode character,
#include "fivewin.ch"
// Thai ANSI chars
function Main()
local oFont, oThai
local aChar := { ;
{ 202, 161, nil, nil, nil, nil }, ;
{ 202, 161, nil, nil, nil, nil }, ;
{ 202, 161, nil, nil, nil, nil } }
AEval( aChar, < |a,i|
a[ 3 ] := Chr( a[ 1 ] )
a[ 4 ] := Chr( a[ 2 ] )
a[ 5 ] := a[ 3 ] + "+" + a[ 4 ] + '='
a[ 6 ] := a[ 3 ] + a[ 4 ]
return nil
> )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-32
DEFINE FONT oThai NAME "Segoe UI" SIZE 0,-64 CHARSET 0xDE
XBROWSER aChar TITLE FWVERSION SETUP ( ;
oBrw:oDataFonts := { oFont, oFont, oThai, oThai, oThai, oThai }, ;
oBrw:cHeaders := { "ASC1","ASC2","CHR1","CHR2","CHR1+CHR2=","RESULT" }, ;
oBrw:nDataStrAligns := AL_CENTER, ;
oBrw:nHeadStAlighns := AL_CENTER );
AUTOFIT
RELEASE FONT oFont, oThai
return nil
It may be problem from unicode character
#include "fivewin.ch"
function Main()
? GetOEMCP(), GetACP(), HB_CDPSELECT()
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 16 guests