Owner-draw list view

来源:互联网 发布:java经典实例 源代码 编辑:程序博客网 时间:2024/06/10 05:18

Is it possible using WTL to create a list control that has different height for each item? So each item has differnet height.
Is there a style that I have to do if I am using owner draw. LVS_OWNERDRAWFIXED only send WM_MEASUREITEM once.
--------------------------------------------------------------------------------
Alas, OWNERDRAWVARIABLE style is used only with list boxes and combo boxes (not list views) but on CE these controls cannot be owner drawn at all. So you need to write your own control or heavily customize list view to create bigger item as a combination of several smaller items.
For OWNERDRAWFIXED controls WM_MEASUREITEM comes just once and then value you return is used for all items in the list.

===================================

There are several points to check.
1. WM_DRAWITEM comes to parent window of list view.
2. List view must be in report mode.
3. There must be at least one column in list view with non-zero size.
===================================

原创粉丝点击