VC中的几个控件

ListBox control vs ComboBox

ListBox可以选择多行

ComboBox类似ListBox和Edit的组合,比ComboBox节省大小。

ComboBox可以设置成三种状态,Simple(此时类似于ListBox),Drop-down(节省空间的ListBox),Drop-down list(节省空间的ListBox,且不可修改内容)

可以发一堆消息,来控制ComboBox,在MFC中,已经对CComboBox进行了封装,如果想得到ComboBox的文字可以使用GetWindowText函数。

List Control

List view controls can display their contents in four different ways, called “views.”

  • Icon view

    Each item appears as a full-sized icon (32 x 32 pixels) with a label below it. The user can drag the items to any location in the list view window.

  • Small icon view

    Each item appears as a small icon (16 x 16 pixels) with the label to the right of it. The user can drag the items to any location in the list view window.

  • List view

    Each item appears as a small icon with a label to the right of it. Items are arranged in columns and cannot be dragged to any location in the list view window.

  • Report view (一般会选择这种)

    Each item appears on its own line, with additional information arranged in columns to the right. The leftmost column contains the small icon and label, and subsequent columns contain subitems as specified by the application. An embedded header control (class CHeaderCtrl) implements these columns. For more information on the header control and columns in a report view, see Using CListCtrl: Adding Columns to the Control (Report View).

Tree Control ,一般将 ‘Has Buttons’‘Has Lines’‘Lines as root’选上

转载于:https://www.cnblogs.com/fanzi2009/archive/2009/07/25/1530674.html

你可能感兴趣的:(VC中的几个控件)