如何得到CListCtrl中的被选中的是哪一行?

qiulei369 2006-08-17 11:33:53
不好意思问这个,但我确实弄了很久了。
...全文
211 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
qiulei369 2006-08-17
  • 打赏
  • 举报
回复
鸟文看不懂:(,试了一堆GetSelect...GetHot...之类的东西,就没试这个。郁闷!
cleverwyq 2006-08-17
  • 打赏
  • 举报
回复
Retrieves the selection mark of a list view control.
int GetSelectionMark( );
Return Value
The zero-based selection mark, or -1 if there is no selection mark.
Remarks
This member function implements the behavior of the Win32 macro, ListView_GetSelectionMark, as described in the Platform SDK.
Example
// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;

// Set the selection mark to the first item only if no other item is
// selected.
if (pmyListCtrl->GetSelectionMark() == -1)
pmyListCtrl->SetSelectionMark(0);

15,975

社区成员

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

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