Maxime Bellengé maxime.bellenge@wanadoo.fr writes:
Because when drawing I want the maximum width among all the bitmaps of the items in order to align correctly the checkmarks and the text. It is the behavior I saw on two different apps. If you use different size bitmaps for each item, windows aligns the text and the checkmark. So I store it in the parent popup to be able to get it when drawing each item otherwise I wouldn't know how to align the checkmark and the text.
Ah OK, I see now. Then you need to choose a better name than bmpSize to indicate that it's the maximum size, and you need to initialize it to zero before starting the loop.