CB_SETDROPPEDWIDTH
An application sends the CB_SETDROPPEDWIDTH message to set the maximum allowable width, in pixels, of the list box of a combo box with the CBS_DROPDOWN or CBS_DROPDOWNLIST style. CB_SETDROPPEDWIDTH 
wParam = (WPARAM) wWidth,     // width of list box, in pixels 
lParam = 0,                   // not used, must be zero 
 
Parameters
wWidth 
Specifies the width of the list box, in pixels. 
Return Values
If the message is successful, The return value is the new width of the list box. If the message fails, the return value is CB_ERR.Res
By default, the minimum allowable width of the drop-zdown list box is 0. The width of the list box is either the minimum allowable width or the combo box width, whichever is larger.

解决方案 »

  1.   

    #define CB_GETDROPPEDWIDTH          0x015f
    #define CB_SETDROPPEDWIDTH          0x0160翻译为VB是:
    {Public|Private} Const CB_GETDROPPEDWIDTH = &H15F&
    {Public|Private} Const CB_SETDROPPEDWIDTH = &H160&
      

  2.   

    好像没有作用!Private Sub Combo1_Click(Area As Integer)
        Dim nResult As Integer
        nResult = SendMessage(Combo1.hwnd, CB_SETDROPPEDWIDTH, 4000, 0)
    End Sub返回值是零!------------而不是传说中的“new width of the list box”。赫赫大虾再救救命!小弟我实在是菜的可以!
      

  3.   

    另外,请问如何在窗口初始化的时候不让datacombo显示他的listbox里面的第一项数据?就显示一个空白最好。再次感谢!
      

  4.   

    设置combo的一个stytle就可以了
      

  5.   

    我把style设为3,还是缺省显示第一列啊?我是不是得自己手动添加一条空白行阿?