FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse:keychar() lost some 2bytes nkeys on no modal dialog
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
xbrowse:keychar() lost some 2bytes nkeys on no modal dialog
Posted: Sun Oct 09, 2011 03: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

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: xbrowse:keychar() lost some 2bytes nkeys on no modal dialog
Posted: Thu Oct 20, 2011 03:09 AM

Here is How to install Chinese word diaplay and input module in XP :

viewtopic.php?f=19t=22705

&

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651

Continue the discussion