|
-
May 9th, 1999, 12:35 AM
#1
Empty String after Editing Listtrl
Hi
I have an Editable ListCtrl
The problem is when the user edits an item, it will only return a string if the user types something. If the user doesn't type antything in and leaves the text in it that was in it before edited, it returns an empty string
I was thinking of checking out if a key was pressed while the edit was going on but I am not sure how to do this
The code I am using is below
Could someone tell me what I am doing wrong or if I am not doing something wrong, what I am not doing????
Thanks 
void CTestView::OnEndlabeledit(NMHDR* pNMHDR, LRESULT* pResult)
{
LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR;
CString Label = pDispInfo->item.pszText;
if(!Label.IsEmpty())
//only goes here if the user edits the label
else {
//goes here if the user does nothing and leaves the string that // was in it before edited
}
*pResult = TRUE;
}
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
|