zoukankan      html  css  js  c++  java
  • clistctrl失去焦点高亮显示选中行

    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 = 0;
    }
    
    
    void CDatabaseParseDlg::OnNMSetfocusListGroup(NMHDR *pNMHDR, LRESULT *pResult)
    {
        // TODO: Add your control notification handler code here
        m_listGroup.SetItemState(m_nGroupSel, FALSE, LVIF_STATE);
        *pResult = 0;
    }
    LVIS_DROPHILITED  作为一个拖放选项高亮显示
    m_listGroup.SetItemState(m_nGroupSel, FALSE, LVIF_STATE);
    FALSE表示值,
    LVIF_STATE表示修改哪一位
     
  • 相关阅读:
    HDU 3537
    POJ 1175
    POJ 1021 人品题
    POJ 2068
    POJ 2608
    POJ 2960
    poj 1635
    ustc 1117
    ural 1468
    数字游戏
  • 原文地址:https://www.cnblogs.com/hervey/p/5138618.html
Copyright © 2011-2022 走看看