ListControl參考:http://www.codeproject.com/KB/list/SubItemSel.aspx

In one of my projects, I needed to add a single cell (SubItem) selection in Report style list control. By default, List control has full row selection style that can be set using "LVS_EX_FULLROWSELECT" as a flag in SetExtendedStyle().

To select a subitem in Report style list control, you have to set LVS_OWNERDRAWFIXED style and have to implement DrawItem() function in your CListCtrl derived class.

Following is the implementation of DrawItem function that shows selection around a subitem in report style list control.

posted @ 2011-04-21 15:21  Yaoquan.Luo  阅读(198)  评论(0编辑  收藏  举报