ymao
asked on
ListView item active notification
Hi
I am writing a Win32 ListView control. I like to be infmormed whenever a listView item is activated (LVNI_SELECTED|LVNI_FOCUSE D). This can be either keyboard scroll, or mouse click, or even programatically select on ListView item. Strangly enough, I can not intercept the LVN_ITEMACTIVATE message at all. See, I don't want to be driving by the keyboard or the mouse message, but rather let ListView itself tell me what is being activated.
Any clue? Thanks
I am writing a Win32 ListView control. I like to be infmormed whenever a listView item is activated (LVNI_SELECTED|LVNI_FOCUSE
Any clue? Thanks
Can you show your code here ?
You need to subclass ClistView for process WM_NOTIFY message inside a control.
Mike
Mike
1. Handle the LVN_ITEMCHANGING or LVN_ITEMCHANGED notification message
2. Use GetNextItem to get the current selection in response to this notification.
3. If you store the previous selection in a variable, you will be able to compare this against #2
2. Use GetNextItem to get the current selection in response to this notification.
3. If you store the previous selection in a variable, you will be able to compare this against #2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Answer2000's solution works perfect!!!!