Alaska Software Inc. - XbpSLE autoKeyboard Unicode DBCS IME
Username: Password:
AuthorTopic: XbpSLE autoKeyboard Unicode DBCS IME
AUGE_OHRXbpSLE autoKeyboard Unicode DBCS IME
on Tue, 01 Jun 2010 01:08:03 +0200
hi

XbpSLE can copy/paste UniCode DBCS, but XbpSLE does not "react" on most
"Pejing" IME with DBCS


now using activeX FlatEdit i got

FEHLERPROTOKOLL von "D:\ALASKA\HXCLASS\HX_SLE.EXE" Datum: 07.03.09 08:52:42
Xbase++ Version     : Xbase++ (R) Version 1.90.350
Betriebssystem      : Windows XP 05.01 Build 02600 Service Pack 2
------------------------------------------------------------------------------
oError:args         :
          -> VALTYPE: O CLASS: HX_FlatEdit
          -> VALTYPE: N VALUE: 9
oError:canDefault   : N
oError:canRetry     : N
oError:canSubstitute: J
oError:cargo        : NIL
oError:description  : Falscher Datentyp fr Member-Variable
oError:filename     :
oError:genCode      :         29
oError:operation    : AutoKeyboard
oError:osCode       :          0
oError:severity     :          2
oError:subCode      :       2248
oError:subSystem    : BASE
oError:thread       :          1
oError:tries        :          0
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Aufgerufen von XBPACTIVEXCONTROL:KEYBOARD(2344)
Aufgerufen von XBPACTIVEXCONTROL:HANDLEEVENT(2030)
Aufgerufen von MAIN(133)

my Code is

CLASS  HX_FlatEdit FROM XbpActiveXControl
EXPORTED:
   VAR    align
   VAR    autoKeyboard
   VAR    autoTab
   VAR    autoSize
   VAR    border
   VAR    editable
   VAR    unReadable
   VAR    cueBanner
   VAR    aPres                            Xbase++ Presentation Parameter
ENDCLASS

METHOD HX_FlatEdit:Init(oParent, oOwner, aPos, aSize, aPP, lVisible)

   DEFAULT aPP TO {}

   IF .NOT. EMPTY(aPP)
      ::aPres := aPP
   ELSE
      ::aPres := {}
   ENDIF

   ::XbpActiveXControl:init(oParent, oOwner, aPos, aSize, aPP, lVisible)
   ::CLSID   := "Codejock.FlatEdit.13.0.0"
   ::License := "Suite Controls Copyright (c) 2003-2009 Codejock Software"+
Chr(13)+Chr(10) +;
                        "PRODUCT-ID: Codejock.Controls.ActiveX.v13.0"+
Chr(13)+Chr(10) +;
                        "VALIDATE-CODE: XXX-XXX-XXX-XXX"
RETURN self

METHOD HX_FlatEdit:Create(oParent, oOwner, aPos, aSize, aPP, lVisible)

   ::XbpActiveXControl:create(oParent, oOwner, aPos, aSize, aPP, lVisible)
   ::tabStop      := .T.
   ::autoKeyboard := .F.           <- MUST set ???
RETURN self
*** eof ***

my Demo Code is

*** quote ***
oXbp := HX_FlatEdit():new( drawingArea, , {20,292}, {200,20}, { {
XBP_PP_BGCLR,XBPSYSCLR_ENTRYFIELD } } )
oXbp:autoTab      := .T.
oXbp:bufferLength := 20
oXbp:dataLink := {|x| IIf( x==NIL, cVarA, cVarA := x ) }
oXbp:tabStop := .T.
oXbp:create()
oXbp:setData()
AAdd ( aEditControls, oXbp )

*** eof ***

do not think about Date 07.03.09 08:52:42
Xbase++ Version     : Xbase++ (R) Version 1.90.350
Betriebssystem      : Windows XP 05.01 Build 02600 Service Pack 2

i did have XP SP3 and 1.9.355 running now. but Problem still exist.

so even SL1 v1.9.355 XbpSLE now can use Unicode DBCS, but
you still can not "write" with "Pejing" IME "into" XbpSLE

back to autoKeyboard ...

Aufgerufen von XBPACTIVEXCONTROL:KEYBOARD(2344)
Aufgerufen von XBPACTIVEXCONTROL:HANDLEEVENT(2030)

SL1 acticveX have to set ::autoKeyboard := .F.   <- MUST set ???

hm ... and what about XbpSLE ?
if i do not "override" default(?) :XbpSLE:Keyboard ... what does "internal"
happend ? can it handle DBCS ?
does it lissen to Windows Queue ?

if not might this be the Reason why "Pejing" IME can not "reach" Xbase++
Queue, while all other Win Application lissen to Window Queue ?

so i did "search" in Forum and found

1st try to "tell" Alaska ( Volker Spahn ) the Problem with XbpSLE
from Liao, "IME setting & XbpSLE:autoKeyboard",
public.xbase++.generic,Montag,  26.
November 2001

2nd try was from Shum [MingYik], "question on XbpSle ?", public.xbase++.gui,
19. Juni 2004 with PDR 2194 ( Sample like Helpfile )

3th try i made with "AutoKeyboard / ActiveX", preview.xbase++.servicelevel1,
7. Mrz 2009

when having Problem with ::XbpSLE:Keyboard and ::XbpSLE:autoKeyboard := .T.
which is default  and "Pejing" IME with DBCS.

i did not test it with other DBCS Language, but i think they have same
Problem with there IME and XbpSLE when try to "write" into XbpSLE

greetings by OHR
Jimmy
Pablo BotellaRe: XbpSLE autoKeyboard Unicode DBCS IME
on Tue, 01 Jun 2010 09:39:40 +0200
Hi,

The trouble is that the Xbase++ GUI thread is not calling TranslateMessage() so your control is not receiving WM_CHAR, WM_DEADCHAR, WM_SYSCHAR , WM_SYSDEADCHAR messages.

For XbpSLE Shum was using the OEM charset that works fine with Big-5 , the only trouble was to display statics with some unicode chinese fonts, but we was workarround it  using the function HKSCS_Big5ToUnicode41() from the MS Hong Kong Character Set package and later DrawTextW() to paint the control.

In another project ( this time not in chinesse) that I was need to retrieve WM_CHAR messages I was just subclass the winproc of the control ( ot4xb_SubclassWindow( ::hWnd , Self ) ) and added this code inside the wndproc method 

       if (nMsg >=  WM_KEYFIRST) .and. (nMsg <=  WM_KEYLAST)
          msg := MSG():New()
          msg:hwnd    :=  hWnd
          msg:message :=  nMsg
          msg:wParam  :=  wp
          msg:lParam  :=  lp
          msg:time    :=  @user32:GetMessageTime()
          dw := @user32:GetMessagePos()
          msg:pt:x := GET_X_LPARAM(dw)
          msg:pt:y := GET_Y_LPARAM(dw)
          @user32:TranslateMessage(@msg)
       end
so then I was receiving all the translated keyboard messages

Maybe you may work in this direction with your HX_FlatEdit control, the only trouble is that you must fight with a lot of undocumented stuff and at least for me is more hard to try gues how this undocumented stuff works that instantiate and attach directly the control with the WinApi or ATL.

Regards,
Pablo Botella
AUGE_OHRRe: XbpSLE autoKeyboard Unicode DBCS IME
on Tue, 01 Jun 2010 14:10:24 +0200
hi,


>The trouble is that the Xbase++ GUI thread is not calling
>TranslateMessage() so your control is not receiving
>WM_CHAR, WM_DEADCHAR, WM_SYSCHAR , WM_SYSDEADCHAR messages.

aha ... that is what i thought

> For XbpSLE Shum was using the OEM charset

so do i

>In another project ( this time not in chinesse) that I was need to retrieve
>WM_CHAR messages. I was just subclass the winproc of the control
>( ot4xb_SubclassWindow( ::hWnd , Self ) ) and added this code inside
>the wndproc method
>
>       if (nMsg >=  WM_KEYFIRST) .and. (nMsg <=  WM_KEYLAST)
>          msg := MSG():New()
>          msg:hwnd    :=  hWnd
>          msg:message :=  nMsg
>          msg:wParam  :=  wp
>          msg:lParam  :=  lp
>          msg:time    :=  @user32:GetMessageTime()
>          dw := @user32:GetMessagePos()
>          msg:pt:x := GET_X_LPARAM(dw)
>          msg:pt:y := GET_Y_LPARAM(dw)
>          @user32:TranslateMessage(@msg)
>       end
> so then I was receiving all the translated keyboard messages

ok i understand that i have to Subclass XbpSLE ... but this is what i ask as
default for DBCS

>Maybe you may work in this direction with your HX_FlatEdit control,

Flatedit with ::autoKeyboard := .F. is working with DBCS an "Pejing" IME,
but last Year i do not think and know about autoKeyboard or Subclass ...

>the only trouble is that you must fight with a lot of undocumented stuff
>and at least for me is more hard to try gues how this undocumented stuff
>works that instantiate and attachdirectly the control with the WinApi or
>ATL.

so if it is not easy "for you", what should a "normal" User say ... ?

i hope Alaska now understand what Liao, Shum and i want to say
with chinese DBCS and Xbase++

greetings by OHR
Jimmy