是否有一个选择更改事件为ListView控件? [英] Is there a selection changed event for the listview control?
本文介绍了是否有一个选择更改事件为ListView控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有 LBN_SELCHANGE
但对于一个ListView?
Is there an equivalent event to LBN_SELCHANGE
but for a listview?
推荐答案
使用 LVN_ODSTATECHANGED
事件。
事件参数是指向类型的结构 NMLVODSTATECHANGED
。使用 uNewState
和 uOldState
位字段,以确定哪些是选择更改(因为有其他变更)。您正在寻找的 LVIS_SELECTED
标记。
The event parameter is a pointer to a struct of type NMLVODSTATECHANGED
. Use the uNewState
and uOldState
bit-fields to determine which of these are selection changes (because there are other changes as well). You're looking for the LVIS_SELECTED
flag.
这篇关于是否有一个选择更改事件为ListView控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文