对ListCtrl进行EditLabel,为什么改了内容后自动恢复

hanzp 2003-04-22 10:36:13
比如原来的Item为123。我改成234后按回车(或在其他地方点鼠标),它又恢复为123了。

我是这样写的:
CEdit* pEdit = pList->EditLabel( nSel );
我不知道正确的实现,我的MSDN上没有详细的说明

应该怎么写啊?
...全文
70 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
hanzp 2003-04-22
  • 打赏
  • 举报
回复
-》 飞鸟良:
我只是不知道如何正确对ListCtrl的进行EditLabel(),我现在只是设了LVS_EDITLABELS,Z只要告诉我正确的用法就可以了。谢谢

-?爱看DVD:
返回*pResult = 0;
这是什么意思,我是在我的一个函数中写 pList->Editlabel(nSel) 的,这个pResult 是哪里的呢?我不大清楚

请大家指点小弟,感激不尽
feiniaoliang 2003-04-22
  • 打赏
  • 举报
回复
发给我,我帮你看看好吗??

Eugen_Li@hotmail.com
fenex 2003-04-22
  • 打赏
  • 举报
回复
返回*pResult = 0;
hanzp 2003-04-22
  • 打赏
  • 举报
回复
我明白了,谢谢大家
hanzp 2003-04-22
  • 打赏
  • 举报
回复
我照着MSDN上在添加了OnNotify,为什么编译不能通过啊?系统不认识LVN_ENDLABELEDIT?
BOOL CClientView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
// TODO: Add your specialized code here and/or call the base class
LVN_ENDLABELEDIT pdi = (LPNMLVDISPINFO)lParam;

return CListView::OnNotify(wParam, lParam, pResult);
}


F:\VC\test\V2\Client\ClientView.cpp(615) : error C2146: syntax error : missing ';' before identifier 'pdi'
F:\VC\test\V2\Client\ClientView.cpp(615) : error C2065: 'pdi' : undeclared identifier
F:\VC\test\V2\Client\ClientView.cpp(615) : error C2065: 'LPNMLVDISPINFO' : undeclared identifier
F:\VC\test\V2\Client\ClientView.cpp(615) : error C2146: syntax error : missing ';' before identifier 'lParam'
qujc 2003-04-22
  • 打赏
  • 举报
回复
看看msdn:TN061: ON_NOTIFY and WM_NOTIFY Messages
LVN_ENDLABELEDIT就知道了

15,980

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧