Let the listctrl respond to the name of the mouse is not in the first column

zhaozj2021-02-16  31

void CMyPropertyPage2 :: OnClickListtablegrid (NMHDR * pNMHDR, LRESULT * pResult) {// TODO: Add your control notification handler code here NM_LISTVIEW * pNMListView = (NM_LISTVIEW *) pNMHDR; CString msg; NMITEMACTIVATE * m_plv = (NMITEMACTIVATE *) pNMHDR; long Mouse_x, mouse_y; //msg.format("%d[%D]" ,pnmlistview, m_plv-> ptaction.x); // long i = pnmlistview-> isubitem; // take the list

Mouse_x = m_plv-> pTAction.x; mouse_y = m_plv-> pTAction.y; // Judgment is the first few line Rect M_Rect; Long ItemRow, Itemcol, I; For (i = m_listtablegrid.gettopIndex (); i = mouse_y)) {itemRow = i; break;}} itemcol = pnmlistView- > isubitem; msg.format ("% d]", itemcol, itemrow 1); //Itemrow=m_ListTableGrid.getHotItem();/no us //Itemrow=m_listtablegrid.getSelectionMark();//nouse too must in col 0CString oldmsg = m_listtablegrid.GetItemText (itemrow, itemcol); if (! oldmsg = "*") {msg = "*"; m_selectdatarray [itemrow * m_oldcols itemcol] = 1;} else {msg = "" ; M_selectddatarray [itemrow * m_oldcols itemcol] = 0;} m_listtablegrid.setitemtext (itemRow, itemcol, msg); oldmsg = msg; * propult = 0;}

转载请注明原文地址:https://www.9cbs.com/read-26785.html

New Post(0)