Ejemplo n.º 1
0
        public void SetConversionWindow(Control control, int X, int Y)
        {
            IntPtr          hIMC;
            COMPOSITIONFORM cf = new COMPOSITIONFORM();

            if (HIMEDLL == IntPtr.Zero)
            {
                return;
            }
            // Adjust the position of conversion window
            hIMC = ImmGetContext(ttwinman.HVTWin);
            if (X >= 0)
            {
                cf.dwStyle        = CFS_POINT;
                cf.ptCurrentPos.X = X;
                cf.ptCurrentPos.Y = Y;
            }
            else
            {
                cf.dwStyle = CFS_DEFAULT;
            }
            ImmSetCompositionWindow(hIMC, ref cf);

            // Set font for the conversion window
            if (lfIME != null)
            {
                ImmSetCompositionFont(hIMC, lfIME);
            }

            ImmReleaseContext(ttwinman.HVTWin, hIMC);
        }
Ejemplo n.º 2
0
 public static bool ImmSetCompositionWindow(IntPtr hIMC, ref COMPOSITIONFORM lpCompForm)
 {
     return(PImmSetCompositionWindow(hIMC, ref lpCompForm));
 }