求助,关于ListCtrl
新手提问,如何实现鼠标左键点击List框中的空白区域,则之前选择的item取消选择状态,即没有一个item为选中状态.小弟这段代码没有实现这个目标,错在哪里呢?
CRect rect1;
CRect rect2;
CRect rect3;
CPoint m_Point;
int i = GetItemCount();
GetItemRect(i-1,&rect1,LVIR_BOUNDS);
GetClientRect(&rect2);
rect3.top = rect1.bottom;
rect3.left = rect1.left;
rect3.bottom = rect2.bottom;
GetCursorPos(&m_Point);
if(rect3.PtInRect(m_Point))
{
...
}