private bool OnKillFocus(Message m)
 {
     // If the control is a combobox don't end edit if the handle is a handle
     // of one of the sub controls of the combobox
     if(!(_control is ComboBox)) return true;
     APIsStructs.PCOMBOBOXINFO info = new APIsStructs.PCOMBOBOXINFO();
     info.cbSize = (uint)Marshal.SizeOf(typeof(APIsStructs.PCOMBOBOXINFO));
     if(!APIsUser32.GetComboBoxInfo(_control.Handle, ref info)) return true;
     if(m.WParam == info.hwndCombo || m.WParam == info.hwndItem || m.WParam == info.hwndList)
     {
         ReleaseHandle();
         AssignHandle(m.WParam);
         return false;
     }
     return true;
 }
Пример #2
0
 static public extern bool GetComboBoxInfo(IntPtr hWnd, ref APIsStructs.PCOMBOBOXINFO cbi);