Public Const LB_FINDSTRING=&H18F                    
Public Const LB_SETHORIZONTALEXTENT=&H194   
当然可在API浏览器的常数中找到LB_SETHORIZONTALEXTENT和LB_FINDSTRING都代表一个信息,本身由16位组成高低各有一个数值,一般用不着管它的值,抄来用就是了LB_SETHORIZONTALEXTENT    用于设置listbox水平滚动参滚动宽度 
wParam = (WPARAM) cxExtent  宽度值, pixel为单位
lParam = 0;                 没用,用0填LB_FINDSTRING        用于找到listbox中第一个字符
wParam = (WPARAM) indexStart    从哪儿找起
lParam = (LPARAM) (LPCTSTR) lpszFind    要找字符的地址

解决方案 »

  1.   

    MSDN中有啊!
    LB_SETHORIZONTALEXTENT
    An application sends an LB_SETHORIZONTALEXTENT message to set the width, in pixels, by which a list box can be scrolled horizontally (the scrollable width). If the width of the list box is smaller than this value, the horizontal scroll bar horizontally scrolls items in the list box. If the width of the list box is equal to or greater than this value, the horizontal scroll bar is hidden. LB_SETHORIZONTALEXTENT 
    wParam = (WPARAM) cxExtent; // horizontal scroll width 
    lParam = 0;                 // not used; must be zero 
     
    Parameters
    cxExtent 
    Value of wParam. Specifies the number of pixels by which the list box can be scrolled. 
    Windows 95 and Windows 98: The wParam parameter is limited to 16-bit values. Return Values
    This message does not return a value. Res
    To respond to the LB_SETHORIZONTALEXTENT message, the list box must have been defined with the WS_HSCROLL style. 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.LB_FINDSTRING
    An application sends an LB_FINDSTRING message to find the first string in a list box that contains the specified prefix. LB_FINDSTRING 
    wParam = (WPARAM) indexStart;           // item before start of search 
    lParam = (LPARAM) (LPCTSTR) lpszFind;   // search string address 
     
    Parameters
    indexStart 
    Value of wParam. Specifies the zero-based index of the item before the first item to be searched. When the search reaches the bottom of the list box, it continues from the top of the list box back to the item specified by the indexStart parameter. If indexStart is –1, the entire list box is searched from the beginning. 
    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. lpszFind 
    Value of lParam. Pointer to the null-terminated string that contains the prefix to search for. The search is case independent, so this string can contain any combination of uppercase and lowercase letters. 
    Return Values
    The return value is the index of the matching item, or LB_ERR if the search was unsuccessful. Res
    If you create the list box with an owner-drawn style but without the LBS_HASSTRINGS style, this message returns the index of the item with a long value (supplied as the lParam parameter of the LB_ADDSTRING or LB_INSERTSTRING message) that matches the value supplied as the lpszFind parameter. 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.
      

  2.   

    但是MSDN只对常量进行了说明
    并没有指出常量的值
    所以要用一些API声明工具
    (假如你会C语言的话,直接察看C语言头文件,再改成VB声明,这是最好的方法)这个东西查到的API声明最多http://www.dapha.net/vb/list.asp?id=1
    Allapi(学习API软件)
     
    软件版本:  无图片  
    软件类型: 开发工具 
    运行环境: VB6.0代码 
    授权方式: 共享软件 
    软件大小: 3098K 
    软件评价:  
    整理日期: 2002-8-18 0:13:50 
    作 者: http://www.dapha.net  
    本日下载: 2  本周:360  总计:360 
    下载地址1: 本地下载  
    软件简介: 它是一套学习Api函数不可缺少的软件,内置api流览器