#DEFINE    WM_ML2_GETLISTWIN     (WM_USER + 101)
#DEFINE    WM_ML2_SETDIMENSIONS  (WM_USER + 102)
#DEFINE    WM_ML2_GETLISTREC     (WM_USER + 103)
#DEFINE    WM_ML2_ADDDISPREC     (WM_USER + 104)
#DEFINE    WM_ML2_SETLISTBUF     (WM_USER + 105)
#DEFINE    WM_ML2_SETFLAGS       (WM_USER + 106)
#DEFINE    WM_ML2_REDRAW         (WM_USER + 107)
#DEFINE    WM_ML2_GETLISTBUF     (WM_USER + 108)
#DEFINE    WM_ML2_SETMACROPROC   (WM_USER + 109)
#DEFINE    WM_ML2_SETKEYWCMD     (WM_USER + 110)
#DEFINE    WM_ML2_SETCARET       (WM_USER + 111)

#DEFINE    _ft_text           0
#DEFINE    _ft_bitmap         1
#DEFINE    _ft_keylabel       2 //      /KL=keylabel
#DEFINE    _ft_bitmap_transp  3
#DEFINE    _ft_checkmark      4
#DEFINE    _ft_ext_text       5 //    /FT=font handle
                                //    /FC=foreground color rgb
                                //    /BC=background color rgb
                                //    /TX=text

#DEFINE    _ft_menu           6 //    /TX=text   char 254 = menu seperator
                                //    /IN=indent


#DEFINE _LB_FLAG_INCSEARCH        0x0001
#DEFINE _LB_FLAG_CALCCOUNT        0x0002
#DEFINE _LB_FLAG_AUTOWIDTH        0x0004
#DEFINE _LB_FLAG_PTR              0x0008
#DEFINE _LB_FLAG_SCROLLBAR        0x0010
#DEFINE _LB_FLAG_EXTENDEDSEL      0x0020
#DEFINE _LB_FLAG_HSCROLL          0x0040



structure MewListDispRec
{
   asciiz  fieldname[33];
   word  fieldx    ;
   word  fieldw    ;
   byte  fieldtype ;
   int   fieldflags;
}

prototype mewlist2
{
  int ListBoxCreate( int mwin,              // The edit buffer/window number
                     int startline,         // The starting line in the buffer
                     int count,             // The number of lines
                     int x, y, w, h,        // Position and size in pixels
                     int id,                // Ctrl id
                     int flags,             // Flag bits. See _LB_FLAG_xxxx
                     int incsearch_field,   // Field number to use for  inc search
                     int parent,            // Parent window
                     str disp_str           // display string
                     );

  void ListBoxDispStr(
                       int list_hwnd,           // Listbox hwnd
                       str delimit,             // field delimiter
                       str &disp_str,           // display str
                       int font_width,          // font width
                       int xoffset,             // Starting x position
                       int &disp_height,        // line height
                       int &width,              // calced width
                       int &incsearchfield      // incremental search field
                      );
  void ListSetCount( int list_hwnd, int count );

    // Returns the # of items selected in a mult-selection listbox
  int LBGetSelectCount( int list_hwnd  );

    // Returns true if the item is selected
    // REMEMBER list boxes are zero indexed
  int LBIsItemSelected( int list_hwnd, int item );

  int LBSetHScroll( int list_hwnd, int width );
}