How to implement CEditListCtrl

How to implement CEditListCtrl ?. Editable list management (report / grid view). I have a list view in a report view. It has some meanings. I need to expand on this to change the values ​​present in the list view. I have declared a class that inherits from CListCtrl. And I processed two Window messages to start and stop editing. After receiving messages, I show a text box. But I am not gaining control inside these message handlers. Is there a way to find out the reason?

Or is there another way to implement it.

0


source to share


4 answers


Thanks for all the answers

I made it easy.

  • I have processed WM_LBUTTONDOWN. This handler pops up the edit window to get the new value for the field
  • Processed by LVN_ENDLABELEDIT to know the end of the update.
  • After receiving the above message, update the values.


"One thing I forgot was to set a flag in the resource view for CListCtrl (Edit Labels to TRUE)"

We must implement OnPaint () (in a derived CListCtrl class), otherwise the UI won't update correctly

+1


source


Code Project has some neat grid controls that might help:

http://www.codeproject.com/KB/miscctrl/gridctrl.aspx



http://www.codeproject.com/KB/library/gridprojects.aspx

http://www.codeproject.com/KB/MFC/UltimateGrid.aspx

+1


source


You need to use CComboBox which is basically a combined CEdit and CListCtrl

0


source


This question was also asked here:

How to edit columns in place using CListCtrl?

You can read my answer on this page.

0


source







All Articles