'GoTo'行号,如对CListView控件的支持. [英] 'GoTo' Line number like support for CListView control.

查看:65
本文介绍了'GoTo'行号,如对CListView控件的支持.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在开发使用CListView控件的MFC应用程序.基本上,它是一个查看器,它将读取二进制文件并将显示的信息显示为记录.现在,我必须实现goto记录号之类的功能.我没有任何指向.你们能在这方面提示我吗?

预先感谢.

Hi,

I am developing an MFC application which uses CListView control. It is basically a viewer which will read a binary file and display the info read as records. Now I have to implement a feature like goto record number. I dont have any pointers to that. Can you guys hint me on this.

Thanks in advance.

推荐答案

myListCtrl.SetItemState(idx, LVIS_SELECTED, LVIS_SELECTED)


WritePrivateProfileString可用于存储
下面的函数用于检索在列表控件中选择的相应项目
WritePrivateProfileString can used to store
below function is used to retrive the corresponding item selected in the list control
void CSDINew2View::OnListSelectionChanged(NMHDR * pNotifyStruct, LRESULT * result)
{
	WCHAR m_VStrBuf[256];
	m_VListId = m_CListCtrl.GetHotItem();
	GetPrivateProfileString(_T("List1"),m_CListCtrl.GetItemText(m_VListId,NULL),NULL,m_VStrBuf,256,m_VFileName);
	m_CEdit.SetWindowText(m_VStrBuf);
}


这篇关于'GoTo'行号,如对CListView控件的支持.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆