2010-08-02 46 views

回答

1
BEGIN_MESSAGE_MAP(CMyPropertyPage, CPropertyPage) 
//{{AFX_MSG_MAP(CMyPropertyPage) 
    ON_NOTIFY(LVN_ENDLABELEDIT, IDC_LIST_CONTROL, OnEndLabelEdit) 
//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 

void CMyPropertyPage::OnEndLabelEdit(NMHDR* pNMHDR, LRESULT* pResult) 
{ 
    LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR; 
    if (pDispInfo->item.pszText == NULL) 
    { 
      //Used clicked escape 
    } 
    else 
    { 
      //Data was accepted by user, empty string perhaps? 
    } 
}