clistctrl失去焦点高亮显示选中行

响应两个消息 NM_SETFOCUS,NM_KILLFOCUS

void CDatabaseParseDlg::OnNMKillfocusListGroup(NMHDR *pNMHDR, LRESULT *pResult)
{
// TODO: Add your control notification handler code here
m_nGroupSel = m_listGroup.GetSelectionMark();
m_listGroup.SetItemState(m_nGroupSel, LVIS_DROPHILITED, LVIS_DROPHILITED); *pResult = ;
} void CDatabaseParseDlg::OnNMSetfocusListGroup(NMHDR *pNMHDR, LRESULT *pResult)
{
// TODO: Add your control notification handler code here
m_listGroup.SetItemState(m_nGroupSel, FALSE, LVIF_STATE);
*pResult = ;
}
LVIS_DROPHILITED  作为一个拖放选项高亮显示
m_listGroup.SetItemState(m_nGroupSel, FALSE, LVIF_STATE);
FALSE表示值,
LVIF_STATE表示修改哪一位
 
04-21 10:17