CListView messages 
Author Message
 CListView messages

Hi,
  I would like to a button in a dialog box disabled until the user
selects an element in a CListView control.  What message is generated
when a user selects an CListView element?  I _thought_ it generated a
HDN_ITEMCLICK message, but that didn't seem to do the trick...

Any suggestions would be greatly appreciated.

-Sean Laurent-



Sun, 03 Dec 2000 03:00:00 GMT  
 CListView messages

Quote:

>Hi,
>  I would like to a button in a dialog box disabled until the user
>selects an element in a CListView control.  What message is generated
>when a user selects an CListView element?  I _thought_ it generated a
>HDN_ITEMCLICK message, but that didn't seem to do the trick...

NM_LCLICK
Then just check m_ListCtrl.GetSelectedCount()

cU
--

   http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retriever 1.1 is out: http://retriever.home.ml.org

Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sun, 03 Dec 2000 03:00:00 GMT  
 CListView messages

Try LVN_ITEMCHANGED using class wizard for your CListView.  
The HDN_ITEMCLICK is a message from the CListCtrl's header.
To detect those, I think you need to grab the WM_NOTIFY messages
of your CListView and look for wParam==0 which is the header talking.
Note that trapping the =HDN_ITEMCLICK messages using class wiz
for the CListView does not trap those CListCtrl header messages.

Phil



Quote:
> Hi,
>   I would like to a button in a dialog box disabled until the user
> selects an element in a CListView control.  What message is generated
> when a user selects an CListView element?  I _thought_ it generated a
> HDN_ITEMCLICK message, but that didn't seem to do the trick...

> Any suggestions would be greatly appreciated.

> -Sean Laurent-




Tue, 12 Dec 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. CListView messages

2. This must be simple. Getting CListView message when row selection has change??

3. update CListView background color by posting message

4. problem Handling Click and double click messages in CListView

5. No notification messages passed back to CListView

6. Not Receiving WM_TIMER messages in CListView derived class.

7. (Q) CListView control reflection message

8. CListView Reflected message(s) example anywhere?

9. problem Handling Click and double click messages in CListView

10. Windows.Forms.Message - processing a user defined Windows-message - 2nd try

11. Reading legacy Message Queue messages

12. cfe: ERROR MESSAGE 8ERROR MESSAGE 103

 

 
Powered by phpBB® Forum Software