简体   繁体   中英

Custom CListCtrl

I need to create a ListControl in MFC, each row having different number of columns. How can I do this?

That's not possible. The workaround is trivial, just don't put any text in the sub-item.

You may refer to my guru's(Chris Maunder-Codeproject founder) article:
http://www.codeproject.com/KB/miscctrl/gridctrl.aspx

You could use custom-draw List Control. Then you can specify maximum columns for the control, but draw only specified number of columns in each row. You can fill unwanted columns with a background color. Here's a sample of how you could create custom-draw list control.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM