使用NM_DBLCLK,添加if条件判断。如下:
void CTestDlg::OnNMDblclkList1(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast
// TODO: Add your control notification handler code here
NM_LISTVIEW *pNMListView=(NM_LISTVIEW *)pNMHDR;
int nItem=pNMListView->iItem;
if(nItem>=0 && nItem
//===========响应内容===========//
}
*pResult = 0;
}
拉一个list box出来,然后为其添加消息处理函数Dblclk