{"id":883,"date":"2013-05-16T13:57:26","date_gmt":"2013-05-16T05:57:26","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=883"},"modified":"2013-05-16T13:57:26","modified_gmt":"2013-05-16T05:57:26","slug":"clistctrl%e6%8e%a7%e4%bb%b6%e4%b8%bb%e8%a6%81%e4%ba%8b%e4%bb%b6%e5%8f%8alvn_itemchanged%e6%b6%88%e6%81%af%e5%92%8c%e9%bc%a0%e6%a0%87%e5%8f%8c%e5%87%bb%e5%88%97%e8%a1%a8%e9%a1%b9%e4%ba%8b%e4%bb%b6","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/883","title":{"rendered":"CListCtrl\u63a7\u4ef6\u4e3b\u8981\u4e8b\u4ef6\u53caLVN_ITEMCHANGED\u6d88\u606f\u548c\u9f20\u6807\u53cc\u51fb\u5217\u8868\u9879\u4e8b\u4ef6\u7684\u5904\u7406_ewook’s Lab_\u767e\u5ea6\u7a7a\u95f4"},"content":{"rendered":"
CListCtrl\u63a7\u4ef6\u4e3b\u8981\u4e8b\u4ef6\u53caLVN_ITEMCHANGED\u6d88\u606f\u548c\u9f20\u6807\u53cc\u51fb\u5217\u8868\u9879\u4e8b\u4ef6\u7684\u5904\u7406<\/p>\n
LVN_BEGINDRAG \u9f20\u6807\u5de6\u952e\u6b63\u5728\u88ab\u89e6\u53d1\u4ee5\u4fbf\u8fdb\u884c\u62d6\u653e\u64cd\u4f5c\uff08\u5f53\u9f20\u6807\u5de6\u952e\u5f00\u59cb\u62d6\u62fd\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u4e2d\u7684\u9879\u76ee\u65f6\u4ea7\u751f\uff09<\/p>\n
LVN_BEGINRDRAG \u9f20\u6807\u53f3\u952e\u6b63\u5728\u88ab\u89e6\u53d1\u4ee5\u4fbf\u8fdb\u884c\u62d6\u653e\u64cd\u4f5c\uff08\u5f53\u9f20\u6807\u53f3\u952e\u5f00\u59cb\u62d6\u62fd\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u4e2d\u7684\u9879\u76ee\u65f6\u4ea7\u751f\uff09<\/p>\n
LVN_BEGINLABELEDIT \u5f00\u59cb\u7f16\u8f91\u9879\u7684\u6587\u672c<\/p>\n
LVN_COLUMNCLICK \u5355\u51fb\u5217\uff08\u5f53\u9f20\u6807\u5355\u51fb\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u5217\u6807\u9898\u65f6\u4ea7\u751f\uff09<\/p>\n
NM_CLICK \u5f53\u9f20\u6807\u5355\u51fb\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u65f6\u4ea7\u751f<\/p>\n
LVN_COLUMNCLICK \u5355\u51fb\u5217<\/p>\n
LVN_DELETEALLITEMS \u5220\u9664\u6240\u6709\u9879<\/p>\n
LVN_DELETEITEM \u5220\u9664\u67d0\u4e2a\u9879<\/p>\n
NM_DBLCLK \u5f53\u9f20\u6807\u53cc\u51fb\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u65f6\u4ea7\u751f<\/p>\n
LVN_ENDLABELEDIT \u7ed3\u675f\u5bf9\u9879\u6587\u672c\u7684\u7f16\u8f91<\/p>\n
LVN_GETDISPINFO \u8bf7\u6c42\u9700\u8981\u663e\u793a\u7684\u4fe1\u606f<\/p>\n
LVN_GETINFOTIP \u8bf7\u6c42\u663e\u793a\u5728\u5de5\u5177\u63d0\u793a\u7a97\u53e3\u5185\u7684\u9644\u52a0\u7684\u6587\u672c\u4fe1\u606f<\/p>\n
LVN_HOTTRACK \u9f20\u6807\u6ed1\u8fc7\u67d0\u4e2a\u9879<\/p>\n
LVN_INSERTITEM \u5f53\u5411\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u63d2\u5165\u9879\u76ee\u65f6\u4ea7\u751f<\/p>\n
lVN_ITEMACTIVATE \u6fc0\u6d3b\u67d0\u4e2a\u9879<\/p>\n
LVN_ITEMCHANGED \u67d0\u4e2a\u9879\u5df2\u7ecf\u53d1\u751f\u53d8\u5316<\/p>\n
LVN_ITEMCHANGING \u67d0\u4e2a\u9879\u76ee\u6b63\u5728\u53d1\u751f\u53d8\u5316<\/p>\n
NM_KILLFOCUS \u5f53\u89c6\u8868\u5217\u56fe\u63a7\u4ef6\u5931\u53bb\u7126\u70b9\u65f6\u4ea7\u751f<\/p>\n
LVN_KEYDOWN \u67d0\u4e2a\u952e\u88ab\u6309\u4e0b<\/p>\n
LVN_MARQUEEBEGIN \u5f00\u59cb\u67d0\u4e2a\u8fb9\u6846\u9009\u62e9<\/p>\n
NM_OUTOFMEMORY \u5f53\u5185\u5b58\u6ea2\u51fa\u65f6\u4ea7\u751f<\/p>\n
LVN_ODCACHEHINT \u865a\u62df\u5217\u8868\u63a7\u4ef6\u7684\u663e\u793a\u533a\u57df\u7684\u5185\u5bb9\u53d1\u751f\u4e86\u53d8\u5316<\/p>\n
LVN_ODSTATECHANGED \u865a\u62df\u5217\u8868\u7684\u63a7\u4ef6\u7684\u67d0\u4e2a\u9879\u6216\u67d0\u4e2a\u8303\u56f4\u5185\u7684\u9879\u5df2\u7ecf\u53d1\u751f\u53d8\u5316<\/p>\n
LVN_ODFINDITEM \u9700\u8981\u62e5\u6709\u8005\u67e5\u627e\u4e00\u4e2a\u7279\u5b9a\u7684\u56de\u8c03\u9879<\/p>\n
NM_RCLICK \u5f53\u9f20\u6807\u53f3\u952e\u5355\u51fb\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u65f6\u4ea7\u751f<\/p>\n
NM_RDBLCLK \u5f53\u9f20\u6807\u53f3\u952e\u53cc\u51fb\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u65f6\u4ea7\u751f<\/p>\n
NM_SETFOCUS \u5f53\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u83b7\u5f97\u7126\u70b9\u65f6\u4ea7\u751f<\/p>\n
LVN_SETDISPINFO \u7236\u7a97\u53e3\u5fc5\u987b\u66f4\u65b0\u63a7\u4ef6\u4e3a\u9879\u6240\u7ef4\u62a4\u7684\u4fe1\u606f<\/p>\n
\u6ce8\u89e3\uff1a<\/strong><\/p>\n HDN\uff1aHeader Notify LVN_ITEMCHANGED\u6d88\u606f\u7684\u5904\u7406<\/strong><\/p>\n \u6d88\u606f\u5904\u7406\u51fd\u6570\uff1a<\/p>\n void C***Dlg::OnItemchangedList(NMHDR* pNMHDR, LRESULT* pResult) if(pNMListView->uChanged==LVIF_STATE) *pResult = 0; \u6d88\u606f\u5904\u7406\u51fd\u6570\u4e2d\u7684\u4e24\u4e2aif\u6761\u4ef6\u53e5\u4e00\u5b9a\u8981\u6709\uff0c\u5426\u5219\u53ef\u80fd\u51fa\u73b0\u591a\u6b21\u8fdb\u5165\u5904\u7406\u5185\u5bb9\u7684\u95ee\u9898\u3002<\/p>\n \u9f20\u6807\u53cc\u51fb\u5217\u8868\u9879\u4e8b\u4ef6\u7684\u5904\u7406<\/strong><\/p>\n \u54cd\u5e94NM_DBLCLK\u6d88\u606f\uff1a<\/p>\n void CDisSalaryDlg::OnDblclkList(NMHDR* pNMHDR, LRESULT* pResult) int nItem=pNMListView->iItem; *pResult = 0; \u6d88\u606f\u5904\u7406\u51fd\u6570\u4e2d\u7684if\u8bed\u53e5\u5f88\u91cd\u8981\uff0c\u7528\u4e8e\u5224\u65ad\u53cc\u51fb\u4f4d\u7f6e\u662f\u5426\u5728\u6709\u6570\u636e\u7684\u5217\u8868\u9879\u4e0a\u9762\u3002\u56e0\u4e3aNM_DBLCLK\u6d88\u606f\u662fCListCtrl\u63a7\u4ef6\uff08\u6574\u4f53\uff09\u6d88\u606f\uff0c\u53ea\u8981\u662f\u5728CListCtrl\u63a7\u4ef6\u8303\u56f4\u4e4b\u5185\u6267\u884c\u6b64\u4e8b\u4ef6\u5c31\u4f1a\u4ea7\u751f\u8be5\u6d88\u606f\uff0c\u800c\u4e0d\u4e00\u5b9a\u8981\u5728\u6709\u6570\u636e\u7684\u5217\u8868\u9879\u4e0a\u9762\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" CListCtrl\u63a7\u4ef6\u4e3b\u8981\u4e8b\u4ef6\u53caLVN_ITEMCHANGED\u6d88\u606f\u548c\u9f20\u6807\u53cc\u51fb\u5217\u8868\u9879\u4e8b\u4ef6\u7684\u5904\u7406 LVN_BEGINDRAG \u9f20\u6807\u5de6\u952e\u6b63\u5728\u88ab\u89e6\u53d1\u4ee5\u4fbf\u8fdb\u884c\u62d6\u653e\u64cd\u4f5c\uff08\u5f53\u9f20\u6807\u5de6\u952e\u5f00\u59cb\u62d6\u62fd\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u4e2d\u7684\u9879\u76ee\u65f6\u4ea7\u751f\uff09 LVN_BEGINRDRAG \u9f20\u6807\u53f3\u952e\u6b63\u5728\u88ab\u89e6\u53d1\u4ee5\u4fbf\u8fdb\u884c\u62d6\u653e\u64cd\u4f5c\uff08\u5f53\u9f20\u6807\u53f3\u952e\u5f00\u59cb\u62d6\u62fd\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u4e2d\u7684\u9879\u76ee\u65f6\u4ea7\u751f\uff09 LVN_BEGINLABELEDIT \u5f00\u59cb\u7f16\u8f91\u9879\u7684\u6587\u672c LVN_COLUMNCLICK \u5355\u51fb\u5217\uff08\u5f53\u9f20\u6807\u5355\u51fb\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u5217\u6807\u9898\u65f6\u4ea7\u751f\uff09 NM_CLICK \u5f53\u9f20\u6807\u5355\u51fb\u5217\u8868\u89c6\u56fe\u63a7\u4ef6\u65f6\u4ea7\u751f LVN_COLUMNCLICK \u5355\u51fb\u5217 LVN_DELETEALLITEMS \u5220\u9664\u6240\u6709\u9879 LVN_<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/883"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=883"}],"version-history":[{"count":1,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/883\/revisions"}],"predecessor-version":[{"id":884,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/883\/revisions\/884"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=883"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\nLVN\uff1aListView control Notify
\nNM\uff1aNotify Message
\nTVN\uff1aTreeView control Notify<\/p>\n
\n{
\nNM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;<\/p>\n
\n{
\nif(pNMListView->uNewState & LVIS_SELECTED)
\n{
\n\/\/\u5904\u7406\u5185\u5bb9
\nint nItem=pNMListView->iItem;
\nCString value[6];
\nfor(int i=0;i<6;i++)
\n{
\nvalue[i]=m_List.GetItemText(nItem,i);
\n}
\n}
\n}<\/p>\n
\n}<\/p>\n
\n{
\nNM_LISTVIEW *pNMListView=(NM_LISTVIEW *)pNMHDR;<\/p>\n
\nif(nItem>=0 && nItem<m_List.GetItemCount())\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u5224\u65ad\u53cc\u51fb\u4f4d\u7f6e\u662f\u5426\u5728\u6709\u6570\u636e\u7684\u5217\u8868\u9879\u4e0a\u9762
\n{
\n………….
\n}<\/p>\n
\n}<\/p>\n