开发者

How to make checkboxes in a list view control tri-state?

开发者 https://www.devze.com 2023-02-03 08:53 出处:网络
Is it possible to make the checkboxes in a list view control with LVS_EX_CHECKBOXES style tri-state (having BS_3STATE button style)? I\'m using WTL but I\'m OK manually sendi开发者_高级运维ng messages

Is it possible to make the checkboxes in a list view control with LVS_EX_CHECKBOXES style tri-state (having BS_3STATE button style)? I'm using WTL but I'm OK manually sendi开发者_高级运维ng messages around.


Yes, you need an ImageList with 3 images of a unchecked, checked and indeterminate checkbox. Call ListView_SetImageList() to assign the LVSIL_STATE image list. Manipulate LVITEM.state to display the kind of checkbox you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消