private void SetIMEWindowFont(System.Drawing.Font f) { if (Ime.disableIME || this.hIMEWnd == IntPtr.Zero) { return; } if (this.lf == null) { this.lf = new Ime.LOGFONT(); f.ToLogFont(this.lf); this.lf.lfFaceName = f.Name; } try { Ime.SendMessage(this.hIMEWnd, 643, new IntPtr(10), this.lf); } catch (AccessViolationException accessViolationException) { this.Handle(accessViolationException); } }
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, [In] Ime.LOGFONT lParam);