请问:在listview中取消选择或者选中其他记录时,会触发什么消息?

解决方案 »

  1.   

    LVN_ITEMCHANGED Notification--------------------------------------------------------------------------------Notifies a list-view control's parent window that an item has changed. This notification message is sent in the form of a WM_NOTIFY message. SyntaxLVN_ITEMCHANGED     pnmv = (LPNMLISTVIEW) lParam; 
    Parameterspnmv
    Pointer to an NMLISTVIEW structure that identifies the item and specifies which of its attributes have changed. If the iItem member of the structure pointed to by pnmv is -1, the change has been applied to all items in the list view. 
    Return ValueNo return value. ResIf a list-view control has the LVS_OWNERDATA style, and the user selects a range of items by holding down the SHIFT key and clicking the mouse, LVN_ITEMCHANGED notifications are not sent for each selected or deselected item. Instead, you will receive a single LVN_ODSTATECHANGED notification, indicating that a range of items has changed state. Notification RequirementsMinimum DLL Version None 
    Header commctrl.h 
    Minimum operating systems Windows NT 3.51, Windows 95