views:

39

answers:

4

Hi!

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

+1  A: 

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

Hans Passant
A: 

The Ultimate Grid lets you have columns with overlapping cells. Maybe this will work for what you're trying to do.

Praetorian
A: 

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.

Kirill V. Lyadvinsky
+1  A: 

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

clsy