user26404
user26404

Reputation: 1391

Can CListCtrl use OnMeasureItem() method?

I want to change item's height and width according to a slider, but as far as I know, there's no measureitem method as CListBox. How can I fix this?

Thank you!

Upvotes: 1

Views: 1801

Answers (2)

jussij
jussij

Reputation: 10570

The workaround is to attach an image list to the CListCtrl. The rows will then take on a height based on the height of the image list.

Upvotes: 0

Gerald
Gerald

Reputation: 23499

All items in CListCtrl have to have the same size. I believe you can use OnMeasureItem in the container that holds the CListCtrl, but it won't be called for each item, but only once for the entire control.

Upvotes: 2

Related Questions