Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1608773
  • 博文数量: 585
  • 博客积分: 14610
  • 博客等级: 上将
  • 技术积分: 7402
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-15 10:52
文章存档

2013年(5)

2012年(214)

2011年(56)

2010年(66)

2009年(44)

2008年(200)

分类: C/C++

2012-01-30 19:16:24

使用了虚拟列表的CListCtrl如何避免闪烁

使用虚拟列表时,每次查完数据之后要调用SetItemCount,则这会引起控件刷新,造成闪烁,应该调用

SetItemCountEx(100,LVSICF_NOSCROLL|LVSICF_NOINVALIDATEALL);

  LVSICF_NOINVALIDATEALL   The list view control will not repaint unless affected items are currently in view. This is the default value.

  LVSICF_NOSCROLL   The list view control will not change the scroll position when the item count changes.

  但是,LVSICF_NOSCROLL在有皮肤存在时是无效的,会在滚动条位置引起轻微的闪烁.

阅读(1598) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~