void btnRemove_OnClick(CCtrlFilterListView *) { int idx = m_lstNotes.GetCurSel(); if (idx != LB_ERR) { if (CNoteItem *pItem = (CNoteItem *)m_lstNotes.GetItemData(idx)) { m_lstNotes.DeleteString(idx); m_proto->m_notes.remove(pItem); } RebuildTree(); } EnableControls(); }
void btnEdit_OnClick(CCtrlFilterListView *) { int idx = m_lstNotes.GetCurSel(); if (idx != LB_ERR) { if (CNoteItem *pItem = (CNoteItem *)m_lstNotes.GetItemData(idx)) { CJabberDlgNoteItem dlg(this, pItem); if (dlg.DoModal()) { m_proto->m_notes.Modify(); RebuildTree(); } } } EnableControls(); }