Example #1
0
        protected override void UpdateImeComposition(int aLParam)
        {
            if (FInputHelper.EnableEx && ((aLParam & Imm.GCS_COMPSTR) != 0))
            {
                string vS = GetCompositionStr(Imm.GCS_COMPSTR);
                FInputHelper.SetCompositionString(vS);

                if (FInputHelper.ChangeSize)
                {
                    COMPOSITIONFORM vCF = new COMPOSITIONFORM();
                    if (Imm.ImmGetCompositionWindow(this.hImc, ref vCF))
                    {
                        if (FInputHelper.ResetImeCompRect(ref vCF.ptCurrentPos))
                        {
                            Imm.ImmSetCompositionWindow(this.hImc, ref vCF);
                        }
                    }
                }
            }

            if ((aLParam & Imm.GCS_RESULTSTR) != 0)
            {
                string vS = GetCompositionStr(Imm.GCS_RESULTSTR);
                if (vS != "")
                {
                    if (DoProcessIMECandi(vS))
                    {
                        InsertText(vS);
                    }
                }
            }
        }
Example #2
0
        protected override void UpdateImePosition()
        {
            COMPOSITIONFORM vCF = new COMPOSITIONFORM();

            vCF.ptCurrentPos.X = Caret.X;
            vCF.ptCurrentPos.Y = Caret.Y + Caret.Height + 4;

            if (FInputHelper.EnableEx)
            {
                FInputHelper.ResetImeCompRect(ref vCF.ptCurrentPos);
            }

            vCF.dwStyle = 0x0020;
            Rectangle vr = this.ClientRectangle;

            vCF.rcArea = new RECT(vr.Left, vr.Top, vr.Right, vr.Bottom);
            Imm.ImmSetCompositionWindow(this.hImc, ref vCF);

            if (FInputHelper.EnableEx)
            {
                FInputHelper.CompWndMove(this.Handle, Caret.X, Caret.Y + Caret.Height);
            }
        }