bool SSearchDropdownList::OnEditNotify(EventArgs *e) { EventRENotify *pEvtNotify = sobj_cast<EventRENotify>(e); if(pEvtNotify->iNotify == EN_CHANGE) { if(!m_pDropDownWnd) { m_pDropDownWnd = new SDropdownList(this); m_pDropDownWnd -> Create(m_xmlDropdown.child(KNode_PopupStyle)); SASSERT(m_pDropDownWnd); } EventFillSearchDropdownList evt(this); evt.strKey = sobj_cast<SEdit>(e->sender)->GetWindowText(); evt.pDropdownWnd = m_pDropDownWnd; FireEvent(evt); if(evt.bPopup) { AdjustDropdownList(); }else { CloseUp(IDCANCEL); } } return true; }
BOOL SSearchDropdownList::FireEvent(EventArgs &evt) { if(wcscmp(evt.nameFrom,KName_ListView) == 0) { if(evt.GetID() == EVT_CMD) { CloseUp(IDOK); return TRUE; } } return __super::FireEvent(evt); }
//--------------------------------------------------------------------------- void __fastcall TRightsFrame::CMCancelMode(TCMCancelMode & Message) { if (FPopup && Visible && !FPopingContextMenu && ((Message.Sender == NULL) || (!IsAncestor(Message.Sender, this) && !IsAncestor(Message.Sender, FPopupParent) && (Message.Sender != this)))) { CloseUp(); } TFrame::Dispatch(&Message); }
//--------------------------------------------------------------------------- void __fastcall TRightsFrame::CMDialogKey(TCMDialogKey & Message) { if (FPopup && Visible && ((Message.CharCode == VK_RETURN) || (Message.CharCode == VK_ESCAPE)) && KeyDataToShiftState(Message.KeyData).Empty()) { CloseUp(); Message.Result = 1; } else { TFrame::Dispatch(&Message); } }
BOOL SComboBox::FireEvent( EventArgs &evt ) { if(evt.idFrom == IDC_DROPDOWN_LIST && m_pDropDownWnd) { if(evt.GetID()==EventLBSelChanged::EventID) { OnSelChanged(); return TRUE; } if(evt.GetID() == EventCmd::EventID) { CloseUp(); return TRUE; } } return SComboBase::FireEvent(evt); }
void SComboBase::OnKillFocus(SWND wndFocus) { __super::OnKillFocus(wndFocus); CloseUp(); }
void SComboBase::OnDestroy() { CloseUp(); __super::OnDestroy(); }