No older revisions available
No older revisions available
Mouse Click 후 index 받아 오기 ¶
~cpp
int ListIndex;
DWORD dwPos = ::GetMessagePos();
CPoint point ((int)LOWORD(dwPos), (int)HIWORD(dwPos));
CPoint Index = point;
m_ctrlZoneList.ScreenToClient(&Index);
ListIndex = m_ctrlZoneList.HitTest(Index);
Mouse Click 후 Item의 String 받아 오기 ¶
~cpp
void CBlockDlg::OnItemchangedList1(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
// TODO: Add your control notification handler code here
POSITION pos = m_ctrlBlockList.GetFirstSelectedItemPosition();
int index = m_ctrlBlockList.GetNextSelectedItem(pos);
char buf[64];
m_ctrlBlockList.GetItemText(index, 0, buf, 64);
AfxMessageBox(buf);
*pResult = 0;
}