改变ListBox的字体大小就可以了

解决方案 »

  1.   

    listbox有这个属性吗?不知道你改itemHeight是想达到什么目的?treeview和listview还可以试试。
    listbox可以通过改变字体大小,插入空行的办法来部分实现
      

  2.   

    listbox和combo都是随字体的改变而变的
      

  3.   

    可以设置!
    LB_SETITEMHEIGHT
    An application sends an LB_SETITEMHEIGHT message to set the height, in pixels, of items in a list box. If the list box has the LBS_OWNERDRAWVARIABLE style, this message sets the height of the item specified by the index parameter. Otherwise, this message sets the height of all items in the list box. LB_SETITEMHEIGHT 
    wParam = (WPARAM) index;        // item index 
    lParam = MAKELPARAM(cyItem, 0); // item height 
     
    Parameters
    index 
    Value of wParam. Specifies the zero-based index of the item in the list box. Use this parameter only if the list box has the LBS_OWNERDRAWVARIABLE style; otherwise, set it to zero. 
    Windows 95 and Windows 98: The wParam parameter is limited to 16-bit values. This means list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size in bytes of the items in a list box is limited only by available memory. cyItem 
    Value of lParam. Specifies the height, in pixels, of the item. 
    Return Values
    If the index or height is invalid, the return value is LB_ERR. QuickInfo
      Windows NT: Requires version 3.1 or later.
      Windows: Requires Windows 95 or later.
      Windows CE: Requires version 1.0 or later.
      Header: Declared in winuser.h.