//*************************************************************** void CColorListCtrl::OnKillFocus(CWnd* pNewWnd) { SendMessage(WM_PAINT); CListCtrl::OnKillFocus(pNewWnd); // check if we are losing focus if(pNewWnd != NULL && pNewWnd->GetParent() == this) return; // repaint items that should change appearance if((GetStyle() & LVS_TYPEMASK) == LVS_REPORT) RepaintSelectedItems(); }
//*************************************************************** void CColorListCtrl::OnSetFocus(CWnd* pOldWnd) { CListCtrl::OnSetFocus(pOldWnd); // check if we are getting focus if(pOldWnd!=NULL && pOldWnd->GetParent()==this) return; // repaint items that should change appearance if((GetStyle() & LVS_TYPEMASK)==LVS_REPORT) RepaintSelectedItems(); }
void CListCtrlEx::OnKillFocus(CWnd* pNewWnd) { CListCtrl::OnKillFocus(pNewWnd); // check if we are losing focus to label edit box if(pNewWnd != NULL && pNewWnd->GetParent() == this) return; // repaint items that should change appearance if(m_bFullRowSel && (GetStyle() & LVS_TYPEMASK) == LVS_REPORT) RepaintSelectedItems(); }