CListCtrl::EditLabel

启动就地编辑项目的文本。

CEdit* EditLabel(
   int nItem 
);

参数

  • nItem
    将编辑列表视图项的索引。

返回值

如果成功,指向在编辑项文本的 CEdit 对象;否则 NULL

备注

具有 LVS_EDITLABELS 窗口样式的列表视图控件使用户能够编辑现有项目标签。 用户开始编辑通过单击具有焦点的项的标签。

使用此函数启动指定的就地编辑列表视图的项的文本。

示例

        // Make sure the focus is set to the list view control.
        m_myListCtrl.SetFocus();

        // Show the edit control on the label of the first
        // item in the list view control.
        CEdit* pmyEdit = m_myListCtrl.EditLabel(1);
        ASSERT(pmyEdit != NULL);

要求

Header: afxcmn.h

请参见

参考

CListCtrl选件类

层次结构图

CListCtrl::GetEditControl