LVS_EX_ONECLICKACTIVATE Version 4.70. The list-view control sends an LVN_ITEMACTIVATE notification message to the parent window when the user clicks an item. This style also enables hot tracking in the list-view control. Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. See the Extended List-View Styles Res section for a discussion of item activation.
Version 4.70. The list-view control sends an LVN_ITEMACTIVATE notification message to the parent window when the user clicks an item. This style also enables hot tracking in the list-view control. Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. See the Extended List-View Styles Res section for a discussion of item activation.
我就想知道移动到那个上面了,然后希望listctrl有一个回调给dialog
没断道 ON_NOTIFY(LVN_ITEMACTIVATE, IDC_LIST_RIGHT, OnLvnItemActivateListRight)void CSearchWndDlg::OnLvnItemActivateListRight(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMITEMACTIVATE pNMIA = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
// TODO: 在此添加控件通知处理程序代码
*pResult = 0;
}
超级麻烦。又没有好办法啊?NM_HOVER为什么不管用?
m_TabDefListCtrl.GetWindowRect(rect);
CPoint point;
GetCursorPos(&point);
point.x=point.x-rect.left;
point.y=point.y-rect.top; LVHITTESTINFO LVHTestInfo;
LVHTestInfo.pt = point;
m_TabDefListCtrl.HitTest(&LVHTestInfo);
m_nRow=LVHTestInfo.iItem;
m_TabDefListCtrl.SubItemHitTest(&LVHTestInfo);
m_nCol=LVHTestInfo.iSubItem;