Count selected items of CListView while selecting 
Author Message
 Count selected items of CListView while selecting

Hi All, I'm having trouble with counting the selected number of items in a CListView control
when the user is using a dotted rectangle to select items.

I tried the OnItemchanged() handler, but it will only be called after the user releases the
mousebutton, so it won't update when the user is actually selecting.

I want it just like windows explorer when selecting files, this gets updated at once in
the statusbar.

Can anyone help?

Y. Dobon



Tue, 01 Jul 2003 05:43:42 GMT  
 Count selected items of CListView while selecting
hmm maybe flag a bool variable when the left mouse button goes down, then
handle the mouse move message.  In that handler, check the flag, if it is
true, then update count.  Then handle l-button up and 'unflag' the var.
Might do what you want, not sure

--
Adam

http://www.angelfire.com/games3/majesticshard/


Quote:

> Hi All, I'm having trouble with counting the selected number of items in a
CListView control
> when the user is using a dotted rectangle to select items.

> I tried the OnItemchanged() handler, but it will only be called after the
user releases the
> mousebutton, so it won't update when the user is actually selecting.

> I want it just like windows explorer when selecting files, this gets
updated at once in
> the statusbar.

> Can anyone help?

> Y. Dobon



Tue, 01 Jul 2003 08:06:56 GMT  
 Count selected items of CListView while selecting

Quote:

> hmm maybe flag a bool variable when the left mouse button goes down, then
> handle the mouse move message.  In that handler, check the flag, if it is
> true, then update count.  Then handle l-button up and 'unflag' the var.
> Might do what you want, not sure

> --
> Adam

> http://www.angelfire.com/games3/majesticshard/



>> Hi All, I'm having trouble with counting the selected number of items in a
> CListView control
>> when the user is using a dotted rectangle to select items.

>> I tried the OnItemchanged() handler, but it will only be called after the
> user releases the
>> mousebutton, so it won't update when the user is actually selecting.

>> I want it just like windows explorer when selecting files, this gets
> updated at once in
>> the statusbar.

>> Can anyone help?

>> Y. Dobon

No it doesn't work, WM_MOUSEMOVE message are not send when rect-tracking.....


Tue, 01 Jul 2003 15:34:58 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Change my select statement in a CRecordSet class SELECT VERIABLE1, COUNT(*)

2. selected item in CListView

3. Selecting an Item from CListView from other than the first column

4. CListView : How do you get the selected item?

5. How to select a CListView item programmatically?

6. How to use the Enter key in CListView to select an item

7. Selecting sub-items in a CListView

8. Selecting Items from a multi select list box VC++ 6.0 on W2K

9. How To: Selected Item or Items in Web Browser (in designMode)

10. Problem with SELECT count(*) with OLE DB

11. Error when selecting constants in SELECT (RDC2.0, MFC)

12. No tables to select from when selecting SQL OLEDB provider

 

 
Powered by phpBB® Forum Software