S.O.S ---- CListCtrl
-
Chaps, Am using an ownerdraw VIRTUAL list control (an example of this can be found at codeproject in an earlier program I wrote-the hextext control). How do I set the HEIGHT of an item in CListCtrl? I am not using any image lists/bmps or the sort at all...totall owner drawn, I do my drawing in OnDrawItem. I am passed a DRAWITEMSTRUCT pointer that contains the bounding rect, hdc, etc...that I need. Problem is, I want to set the item HEIGHT. In other words, I need a way to alter the bounding rect-before I get it in the OnDrawItem. Icons/imagelists are out, as I am usign the virtual style. Each item is completely under my control-I am responsible for rendering it. Any suggestions would be very much appreciated. "When it's done." - 3D Realms.
-
Chaps, Am using an ownerdraw VIRTUAL list control (an example of this can be found at codeproject in an earlier program I wrote-the hextext control). How do I set the HEIGHT of an item in CListCtrl? I am not using any image lists/bmps or the sort at all...totall owner drawn, I do my drawing in OnDrawItem. I am passed a DRAWITEMSTRUCT pointer that contains the bounding rect, hdc, etc...that I need. Problem is, I want to set the item HEIGHT. In other words, I need a way to alter the bounding rect-before I get it in the OnDrawItem. Icons/imagelists are out, as I am usign the virtual style. Each item is completely under my control-I am responsible for rendering it. Any suggestions would be very much appreciated. "When it's done." - 3D Realms.
I think you have to handle the WM_MEASUREITEM message, but the height you set will affect all the rows, because the ListView control uses a LVS_OWNERDRAWFIXED style (fixed height). Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)