CListCtrl::GetFirstSelectedItemPosition,CListCtrl::GetNextSelectedItem可以得到选中的行
要得到选中的列可以给他加上WM_LBUTTONDOWN message handler,判断那一列被选中
extern CListCtrl* pmyListCtrl;
// The pointer where the mouse was clicked.
extern CPoint myPoint;LVHITTESTINFO lvhti;// Clear the subitem text the user clicked on.
lvhti.pt = myPoint;
pmyListCtrl->SubItemHitTest(&lvhti);if (lvhti.flags & LVHT_ONITEMLABEL)
{
pmyListCtrl->SetItemText(lvhti.iItem, lvhti.iSubItem, NULL);
}
要得到选中的列可以给他加上WM_LBUTTONDOWN message handler,判断那一列被选中
extern CListCtrl* pmyListCtrl;
// The pointer where the mouse was clicked.
extern CPoint myPoint;LVHITTESTINFO lvhti;// Clear the subitem text the user clicked on.
lvhti.pt = myPoint;
pmyListCtrl->SubItemHitTest(&lvhti);if (lvhti.flags & LVHT_ONITEMLABEL)
{
pmyListCtrl->SetItemText(lvhti.iItem, lvhti.iSubItem, NULL);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货