xbrowse:keychar() lost some 2bytes nkeys on no modal dialog

xbrowse:keychar() lost some 2bytes nkeys on no modal dialog

Postby ShumingWang » Sun Oct 09, 2011 3:47 am

Hi,
//1 Only for test lost 2 bytes word input.
METHOD KeyChar( nKey, nFlags ) CLASS TXBrowse
...
do case
...
case nKey == VK_ESCAPE
memowrit("aaa.txt",::ckeychar )
::ckeychar:=""
// a temparary data 'ckeychar' add to xbrowse class
...

otherwise

::cKeyChar += Chr( nKey )
...

We open log file aaa.txt,we can found 2bytes Chinese word inputed lost some chars.
While xbrowse keychar() of modal dialog works fine.


// 2 for test connect to xbrowse ocol:edit

METHOD KeyChar( nKey, nFlags ) CLASS TXBrowse
...
do case
...
case nKey == VK_ESCAPE
memowrit("aaa.txt",::ckeychar )
::ckeychar:=""
// a tempary data 'ckeychar' add to xbrowse class
...

otherwise

::cKeyChar += Chr( nKey )
...
elseif ( ::lFastEdit ...
SysRefresh()
oCol:Edit()
...

method edit() class TXBrwColumn
...
if ::lEditBorder
WndBoxIn( ::oBrw:GetDC(), nRow-1, nCol-1, nRow + nHeight + 1, nCol + nWidth + 1)
::oBrw:ReleaseDC()
endif

ckey:=::obrw:ckeychar
for nI := 1 To Len( cKey )

PostMessage( ::oEditGet:hWnd, WM_CHAR, Asc( Substr( cKey, nI, 1 )) )
next ni


Best regards!
Shuming Wang
Last edited by ShumingWang on Thu Oct 20, 2011 8:27 am, edited 1 time in total.
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Re: xbrowse:keychar() lost some 2bytes nkeys on no modal dialog

Postby ShumingWang » Thu Oct 20, 2011 3:09 am

Here is How to install Chinese word diaplay and input module in XP :
viewtopic.php?f=19&t=22705
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 113 guests