protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); // Hook the edit control if (DropDownStyle == ComboBoxStyle.DropDown) { IntPtr hEditControl = WindowsAPI.GetDlgItem(Handle, 0x3E9); Debug.Assert(hEditControl != IntPtr.Zero, "Fail to get ComboBox's Edit Control Handle..."); editHook = new EditCtrlHook(this); editHook.AssignHandle(hEditControl); } }
protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); // Hook the edit control if ( DropDownStyle == ComboBoxStyle.DropDown ) { IntPtr hEditControl = WindowsAPI.GetDlgItem(Handle, 0x3E9); Debug.Assert(hEditControl != IntPtr.Zero, "Fail to get ComboBox's Edit Control Handle..."); editHook = new EditCtrlHook(this); editHook.AssignHandle(hEditControl); } }