哪位高人能给讲讲CListCtrl::HitText()是做什么用的? 非常感谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 void CBizmeetDlg::OnClickList2(NMHDR* pNMHDR, LRESULT* pResult) { //取得鼠标的位置 CPoint pt; GetCursorPos( &pt); m_listCtrl.ScreenToClient(&pt); int iIndex = m_listCtrl.HitTest(pt,NULL); if(-1 != iIndex ) { CString strMess ; strMess.Format("你选中第%d项",iIndex); AfxMessageBox(strMess); } *pResult = 0;} 初始化的代码 m_listCtrl.InsertColumn(0,"列1",LVCFMT_LEFT,100,0); m_listCtrl.InsertItem(0,"1"); m_listCtrl.InsertItem(1,"2"); 技术可行,符合你的要求吗?如果符合要求请结贴,如果还有新问题,且有代码需要上传:请把代码压成*.rar当附件发在我的论坛(http://www.hedanwang.cn/bbs)上.压代码前,请先删除debug,release文件夹,及*.opt,*.ncb,*.plg,*.aps. CS模型recvfrom接收结构体,谢谢啦。。。。。。 对话框如何让线程结束时自动调用窗口关闭? 高手帮忙进来看看代码!急用 msvc6 数学形态学细化处理的问题 【from 何东健主编《数字图像处理》CMorphPro::ThiningDIB】为何是 “5×5相邻区域像素值”? 打印中如何用程序控制页面的大小??? 推荐一些native API的资料~~~!!! 版主stonespace进来拿分 如何避免结构的对齐 谁能告诉我怎么用vc做到这样的窗口半透明效果? 请问有谁了解函数GetMainFrame()? web browser 控件 ShellExecute 如何以最大化模式打开?
{
//取得鼠标的位置
CPoint pt;
GetCursorPos( &pt);
m_listCtrl.ScreenToClient(&pt);
int iIndex = m_listCtrl.HitTest(pt,NULL);
if(-1 != iIndex )
{
CString strMess ;
strMess.Format("你选中第%d项",iIndex);
AfxMessageBox(strMess);
}
*pResult = 0;
}
初始化的代码
m_listCtrl.InsertColumn(0,"列1",LVCFMT_LEFT,100,0);
m_listCtrl.InsertItem(0,"1");
m_listCtrl.InsertItem(1,"2");