CComboBox::Create

BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID );

  • CBS_AUTOHSCROLL   Automatically scrolls the text in the edit control to the right when the user types a character at the end of the line. If this style is not set, only text that fits within the rectangular boundary is allowed.

  • CBS_DROPDOWN   Similar to CBS_SIMPLE, except that the list box is not displayed unless the user selects an icon next to the edit control.

    CBS_DROPDOWN 当用户选择时下拉列表才显示

    CBS_SIMPLE CBS_DROPDOWN类似只不过下拉表显示

  • CBS_DROPDOWNLIST   Similar to CBS_DROPDOWN, except that the edit control is replaced by a static-text item that displays the current selection in the list box.
    这种也比较常用,但这个不可以有编辑功能,只能选择

CBS_DROPDOWNCBS_DROPDOWNLIST   ,都有一个小下拉的黑三角

  • CBS_HASSTRINGS   An owner-draw combo box contains items consisting of strings. The combo box maintains the memory and pointers for the strings so the application can use the GetText member function to retrieve the text for a particular item.

  • CBS_OEMCONVERT   Text entered in the combo-box edit control is converted from the ANSI character set to the OEM character set and then back to ANSI. This ensures proper character conversion when the application calls the AnsiToOem Windows function to convert an ANSI string in the combo box to OEM characters. This style is most useful for combo boxes that contain filenames and applies only to combo boxes created with the CBS_SIMPLE or CBS_DROPDOWN styles.

  • CBS_OWNERDRAWFIXED   The owner of the list box is responsible for drawing its contents; the items in the list box are all the same height.

  • CBS_OWNERDRAWVARIABLE   The owner of the list box is responsible for drawing its contents; the items in the list box are variable in height.

  • CBS_SIMPLE   The list box is displayed at all times. The current selection in the list box is displayed in the edit control.

  • CBS_SORT   Automatically sorts strings entered into the list box.

  • CBS_DISABLENOSCROLL   The list box shows a disabled vertical scroll bar when the list box does not contain enough items to scroll. Without this style, the scroll bar is hidden when the list box does not contain enough items.

  • CBS_NOINTEGRALHEIGHT   Specifies that the size of the combo box is exactly the size specified by the application when it created the combo box. Normally, Windows sizes a combo box so that the combo box does not display partial items.
posted on 2011-08-06 16:35  role  阅读(1235)  评论(0编辑  收藏  举报