Pergunta

I have a variable-height owner draw ListBox control. When I call AddString, a MeasureItem message is sent asking me to tell Windows the size of the item. The problem is, the code hasn't had a chance to call SetItemData yet, so the code can't determine the size yet.

I've tried calling SetRedraw(FALSE) hoping that would postpone the measure request, but no luck.

So how can I add an item to a CListBox and get the Item Data passed in at the same time? I've tried with and without LBS_HASSTRINGS. Not sure what else to try.

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top