Home > Software engineering >  New list from the content to the edit box
New list from the content to the edit box

Time:09-19

Ask a question, want to implement a function, you can double-click the data in the list of make it show to edit box in order to realize the change, how to do

CodePudding user response:

Add ListCtrl NM_DBLCLK incident response, in the judgment and values and then update the control

CodePudding user response:

In simple terms, several steps
Response double-click events
1.2. The value in a double-click event program,
3. To edit box assignment
4. Refresh the display

CodePudding user response:

CListCtrl: : SetItemData ();
Response function, double-click events to get the data, display to the controls

CodePudding user response:

NM_CLICKED
 
//NM_CLICK message
Void CXXDlg: : OnClickList1 (NMHDR * pNMHDR, LRESULT * pResult)
{
//TODO: Add your the control notification handler code here
PNMHDR NMLISTVIEW * pList=(NMLISTVIEW *);
Int iItem=pList - & gt; IItem.
If (1!=iItem)
{
Int iSubItem=pList - & gt; The iSubItem;
Cstrings strText (_T (" "));
StrText. The Format (_T (" iSubItem iItem: % d: % d "), the iItem, iSubItem);
AfxMessageBox (strText);
}
* pResult=0;
}

CodePudding user response:

upstairs said all access control to the data, set up to the control of what you want
  • Related