CVSListBox Class
The CVSListBox class supports an editable list control.
class CVSListBox : public CVSListBoxBase
Members
Public Constructors
Name |
Description |
---|---|
Constructs a CVSListBox object. |
|
CVSListBox::~CVSListBox |
Destructor. |
Public Methods
Name |
Description |
---|---|
Adds a string to a list control. (Overrides CVSListBoxBase::AddItem.) |
|
Starts an edit operation on the text of a list control item. (Overrides CVSListBoxBase::EditItem.) |
|
Retrieves the number of strings in an editable list control. (Overrides CVSListBoxBase::GetCount.) |
|
Retrieves an application-specific 32-bit value that is associated with an editable list control item. (Overrides CVSListBoxBase::GetItemData.) |
|
Retrieves the text of an editable list control item. (Overrides CVSListBoxBase::GetItemText.) |
|
Retrieves the zero-based index of the currently selected item in an editable list control. (Overrides CVSListBoxBase::GetSelItem.) |
|
CVSListBox::PreTranslateMessage |
Translates window messages before they are dispatched to the TranslateMessage and DispatchMessage Windows functions. For more information and method syntax, see CWnd::PreTranslateMessage. (Overrides CVSListBoxBase::PreTranslateMessage.) |
Removes an item from an editable list control. (Overrides CVSListBoxBase::RemoveItem.) |
|
Selects an editable list control string. (Overrides CVSListBoxBase::SelectItem.) |
|
Associates an application-specific 32-bit value with an editable list control item. (Overrides CVSListBoxBase::SetItemData.) |
Protected Methods
Name |
Description |
---|---|
Returns the handle to the current embedded list view control. |
Remarks
The CVSListBox class provides a set of edit buttons that enable the user to create, modify, delete, or rearrange the items in a list control.
The following is a picture of the editable list control. The second list entry, which is titled "Item2", is selected for editing.
If you use the resource editor to add an editable list control, notice that the Toolbox pane of the editor does not provide a predefined editable list control. Instead, add a static control such as the Group Box control. The framework uses the static control as a placeholder to specify the size and position of the editable list control.
To use an editable list control in a dialog box template, declare a CVSListBox variable in your dialog box class. To support data exchange between the variable and the control, define a DDX_Control macro entry in the DoDataExchange method of the dialog box. By default, the editable list control is created without edit buttons. Use the inherited CVSListBoxBase::SetStandardButtons method to enable the edit buttons.
For more information, see the Samples directory, the New Controls sample, the Page3.cpp and Page3.h files.
Inheritance Hierarchy
CVSListBoxBase
Requirements
Header: afxvslistbox.h