|
-
December 24th, 2011, 04:43 PM
#3
Re: old problem with CListCtrl::EditLabel
Thanks for pointing out my misinterpretation of 'handle'.
Yes, I have read and reread the references noted and have experimented extensively, especially:
Editing listview subitems using LVM_GETEDITCONTROL
By Reg Anderson November 21, 1998
http://www.codeguru.com/Cpp/controls...cle.php/c1077/
You'll notice in the many comments accompanying this article that the method proposed, which is devised using CListView, doesnt work with CListCtrl.
My app is based on a CView with a pane (CWorkspaceWnd) derived from CDockablePane containing a CListCtrl member that does all the heavy lifing. It works fine except that the item edits disappear as noted by myself and many others.
I have tried to add Reg Anderson's ListEditView.h and ListEditView.cpp to my test app, but it will not compile (VS 2010), allegedly not recognizing CListVew as a class. Consequently, a connot substitute the CWorkdspaceWnd member, CListCtrl m_wndWorkspaceList, with CListEditView m_m_wndWorkspaceList. So that approach appears to be a dead end.
My next effort was to add the CLVEdit class of Reg Anderson and implement
Code:
afx_msg void OnEndLabelEdit(NMHDR* pNMHDR,LRESULT* pResult);
afx_msg void OnBeginLabelEdit(NMHDR* pNMHDR,LRESULT* pResult);
}
identical to the method used by Anderson in his CListEditView class. This compiles but the edits still disappear as before. Incidently, I am only interested in editing the item in the first column, not any of the subitems.
I have attached a demo program for anyone interested in trying to get this to work.
Last edited by Mike Pliam; December 24th, 2011 at 07:24 PM.
mpliam
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|