/// <summary> /// Update UIState of the control with NativeWindowCommon.UISF_HIDEFOCUS /// </summary> /// <param name="ctrl"></param> /// <param name="set"></param> private static void UpdateUIstate(Control ctrl, bool set) { int UIS_l = set ? NativeWindowCommon.UIS_SET : NativeWindowCommon.UIS_CLEAR; int wParam = NativeWindowCommon.MakeLong(UIS_l, NativeWindowCommon.UISF_HIDEFOCUS); NativeWindowCommon.SendMessage(ctrl.Handle, NativeWindowCommon.WM_UPDATEUISTATE, wParam, 0); ctrl.Invalidate(ctrl.ClientRectangle); }
/// <summary> /// /// </summary> protected override void SetMargin(Control control) { base.SetMargin(control); // fixed defect #:135398 & 136561 // same as old defect(fix in edt_edit.cpp) QCR#793923: Caret for hebrew edit control is not seen fully when there is no text. // Exact reason for this problem is not known. However, setting right margin to 1, seems to // fix this problem. Other solution discussed was, removing WS_CLIPSIBLINGS style from // edit control. But this looked to be risky, as impact on the behavior for existing problems // cannot be predicted. // fixed 136561: this code must be execute after set right to left property if (Manager.Environment.Language == 'H') { NativeWindowCommon.SendMessage(control.Handle, NativeWindowCommon.EM_SETMARGINS, NativeWindowCommon.EC_LEFTMARGIN | NativeWindowCommon.EC_RIGHTMARGIN, NativeWindowCommon.MakeLong(0, 1)); } }