比如。不管列表里有多少项。我想让窗口有固定的高度。

解决方案 »

  1.   

    BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID );
    rectPoints to the position and size of the combo box. Can be a RECT structure or a CRect object.不是这个参数吗?
      

  2.   

    CComboBox::SetDroppedWidth
    int SetDroppedWidth( UINT nWidth );Return ValueIf successful, the new width of the list box, otherwise CB_ERR. ParametersnWidthThe minimum allowable width of the list-box portion of the combo box, in pixels.呵呵,楼上的是高人啊
      

  3.   

    SetDroppedWidth Sets the minimum allowable width for the drop-down list-box portion of a combo box. 
    如果你要保证一样的高度,那你就多添加几项,凑足固定高度,在选的时候不处理那些凑上来的项不就可以了。
      

  4.   

    http://blog.csdn.net/bluejoe2000/archive/2009/06/15/4269540.aspx
      

  5.   


    你看见楼主要固定高度吗?如果要动态调整,用MoveWindow就可以了。
    如果要在资源中编辑的话,点击COMBOBOX的那个向下的箭头(一定要点在箭头上),然后拖动改变高度。
      

  6.   

    还需要把属性中的 no integral height 设成true
      

  7.   

    setWindowPos和movewindow都只能改变combobox的宽度。高度不行。我是vs2005
      

  8.   

    VC的界面编程真的很不方便啊,比较起Delphi 来 郁闷