接着上面的。
需要把listbox的style设为lbOwnerDrawFixed
。因为:
Each time an item is displayed in an lbOwnerDrawFixed list box, the OnDrawItem event occurs. The event handler for OnDrawItem draws the specified item. The ItemHeight property determines the height of each of the items.