home | |||
links |
|
||
developer's mag main page article part 1 part 2 part 3 part 4 part 5 |
2 - Just a Simple ChildThe CList is only one of the ways to display rows of data (CTable is another). However, while CTable manages its own memory, CList doesn't - it simply exists to put a graphical wrapper on whatever you throw at it. As such, you can throw just about anything at it, and get quite useful results.From a simplistic point of view, a list box is row upon row of data. The control actually requires very little from the data - it knows how to draw itself, and just needs a little help with how high to make a row, and what to draw in a particular row. The ebm CList class abstracts to that level, providing a very efficient method of displaying data, especially data you already have set up in memory. A typical class would be:
We can't use the CList directly (two necessary functions DrawRow() and GetRowHeight() are not implemented), but by creating a child class, we get access to the CList functions, while customizing the display with our own display calls. Previous Section Next Section |
||
Copyright © 2001-2006 ebmDevMag.com - Legal Notice |