Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3029

Force OnMeasureItem() call on a ListBox

$
0
0
Hi, ALL,
I have a following situation.
1. I know that OnMeasureItem() is called only once - when the control is created - according to MSDN.
2. I'm trying to create a ListBox (not a ListCtrl!!!) and change the font on it. Unfortunately after calling SetFont(), OnMeasureItem() is not called and I end up with ugly looking screen.
3. I found this, and saw that in reply #9 Alin gave an example. Unfortunately, it is for the ListCtrl, and not a ListBox.

So, now, is there a working solution for a ListBox that does not involve re-creating control?
Or maybe I can just simply call OnMeasureItem() myself?

Thank you.

Viewing all articles
Browse latest Browse all 3029

Latest Images

Trending Articles



Latest Images