zoukankan      html  css  js  c++  java
  • MFC CListCtrl 条目取消选中

    SetItemState(i,   0,   -1);

    SetItemState(i,   0,   LVIS_SELECTED);

    参考:http://blog.csdn.net/tuying_001/article/details/6220753

    说明:

    MSDN中有以下一段话:

    CListCtrl::SetItemState

    Parameters

    nState

    New values for the state bits.

    nMask

    Mask specifying which state bits to change.

    LVITEM Structure

    stateMask

    Value specifying which bits of the state member will be retrieved or modified. For example, setting this member to LVIS_SELECTED will cause only the item's selection state to be retrieved. 

    即:stateMask决定哪一个或多个条目风格修改有效; state 为修改后的新值。

    This member allows you to modify one or more item states without having to retrieve all of the item states first. For example, setting this member to LVIS_SELECTED and state to zero will cause the item's selection state to be cleared, but none of the other states will be affected. 

    即:设置stateMask的值为LVIS_SELECTED,并且state 的值设置为0,则条目的选中风格被去除,其他风格将不受影响。

    To retrieve or modify all of the states, set this member to (UINT)-1.

    即:如果要修改条目所有的风格,只需要将stateMask的值设置为-1.

  • 相关阅读:
    acm 总结之大数加法
    hdu 1004
    hdu 1887
    hdu 2007
    hdu 2004
    ACM总结之 A+B problem 总结
    nyoj_42_一笔画问题_201403181935
    最短路径--Floyd算法
    最短路径—Dijkstra算法
    nyoj_114_某种序列_201403161700
  • 原文地址:https://www.cnblogs.com/jdfemqi/p/3171843.html
Copyright © 2011-2022 走看看