I connect a Iist in the Tab Control Control controls, a list Control with Control checkbox, how do I realize the selection window, click the Tab Control list the contents of the space can be selection, a list Control with variable m_List
CodePudding user response:
Find m_ListCtrlVoid CxxxxDlg: : OnButton1 ()
{
//TODO: Add your the control notification handler code here
Int. All=m_ListCtrl GetItemCount ();
for(int i=0; i
M_ListCtrl. SetItemState (I, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
}
M_ListCtrl. SetFocus ();
}
CodePudding user response:
M_ListCtrl attribute must be much choose!CodePudding user response:
M_List. SetItemState (1, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);CodePudding user response:
TCN_SELCHANGECodePudding user response:
All don't know what you said is refers to the check box selection or the entire line selection1, if is a check box selection
For (int nIndex=0; NIndex & lt; M_List. GetItemCount (); NIndex++)
{
M_List. SetCheck (nIndex, TRUE);
}
2, if it is the entire line selection
For (int nIndex=0; NIndex & lt; M_List. GetItemCount (); NIndex++)
{
M_List. SetItemState (nIndex, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
}
CodePudding user response:
TAB is selected to list send a message to update the list