Listview problems : Handling LVN_ITEMCHANGING 
Author Message
 Listview problems : Handling LVN_ITEMCHANGING

hi everybody,

i had posted this problem before, but got no response.
i have subclassed my listcontrol to behave like a grid, on which inplace
editing can take place. before the user can move to another row, the data
on the current row has to be validated. hovever the listview control sends
three LVN_ITEMCHANGING messages, each time the item is about to change.
i dont want the validation to take place a number of times.
to prevent this, i have the following lines of code in OnItemChanging.

        if( (pNMLV->uNewState == 0) && (pNMLV->uOldState & LVIS_FOCUSED))
        {
                *pResult = !IsRowValid(nRow);
        }

this works fine when the row is changed with the keyboard. but the
validation is done twice when it is changed with the mouse. this has
something to do with the way OnLButtonDown is handled with respect to the
listcontrol.
can somebody help.
thannks in advance.
-harish



Mon, 06 Mar 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Deleting an ListView item during LVN_ITEMCHANGING causes problems.

2. Problem with LVN_ITEMCHANGING notification in CListView

3. Obtaining Handle to a ListView's ScollBar

4. Hover handling in ListView

5. CListCtrl and LVN_ITEMCHANGING message

6. REPOST: LVN_ITEMCHANGING (CListView)

7. LVN_ITEMCHANGING Notification

8. LVN_ITEMCHANGING and GetSelectedCount

9. CListCtrl and LVN_ITEMCHANGING

10. about:Virtual List View Control 's LVN_ITEMCHANGING Notify

11. LVN_ITEMCHANGING in CListCtrl

12. Multiple LVN_ITEMCHANGING messages - a bug in comctl32?

 

 
Powered by phpBB® Forum Software