CListCtrl?
-
When you assign the CListCtrl a variable in the Class Wizard, make sure you assign a variable to the control, and the value...Cumon, you know what im talking about... when you assign the CListCtrl's control ID a variable, it asks for a name: m_????? then a catagory (in a combo box): Control <----select VALUE here then for a type (in a combo box): CListCtrl (or whatever)<---select CString here :eek: ;P -Reid the C++/C# programmer (Caution: I am a teenager, and that means that I think I know everything...but probably don't...) Maybe this will help you understand: CPerson Reid = "Teenager"; CPerson All_C_Programmers[9999999999]; int i; int num_Programmers_That_Are_Teenagers = 0; for (i=0;i<9999999999;i++) { if (All_C_Programmers[i]=="Teenager") { num_Programmers_That_Are_Teenagers++; } } cout << num_Programmers_That_Are_Teenagers; ------------- 1 <------
-
You can either handle the WM_LBUTTONDOWN message in the List-View and use the folowing to get the item's text;
int nItem = GetNextItem ( -1, LVNI_SELECTED | LVNI_FOCUSED ); CString sItemText = GetItemText ( nItem, 0 ); // or use GetItem to get more info
Or you can handle the List-View's NM_CLICK notification and grab the text as above, using the index given in the NMITEMACTIVATE structure. -Ben --------- On the topic of code with no error handling -- It's not poor coding, it's "optimistic" ;) -
When you assign the CListCtrl a variable in the Class Wizard, make sure you assign a variable to the control, and the value...Cumon, you know what im talking about... when you assign the CListCtrl's control ID a variable, it asks for a name: m_????? then a catagory (in a combo box): Control <----select VALUE here then for a type (in a combo box): CListCtrl (or whatever)<---select CString here :eek: ;P -Reid the C++/C# programmer (Caution: I am a teenager, and that means that I think I know everything...but probably don't...) Maybe this will help you understand: CPerson Reid = "Teenager"; CPerson All_C_Programmers[9999999999]; int i; int num_Programmers_That_Are_Teenagers = 0; for (i=0;i<9999999999;i++) { if (All_C_Programmers[i]=="Teenager") { num_Programmers_That_Are_Teenagers++; } } cout << num_Programmers_That_Are_Teenagers; ------------- 1 <------
Not true. I am a teenager too. -Matt Newman :suss:
-
When you assign the CListCtrl a variable in the Class Wizard, make sure you assign a variable to the control, and the value...Cumon, you know what im talking about... when you assign the CListCtrl's control ID a variable, it asks for a name: m_????? then a catagory (in a combo box): Control <----select VALUE here then for a type (in a combo box): CListCtrl (or whatever)<---select CString here :eek: ;P -Reid the C++/C# programmer (Caution: I am a teenager, and that means that I think I know everything...but probably don't...) Maybe this will help you understand: CPerson Reid = "Teenager"; CPerson All_C_Programmers[9999999999]; int i; int num_Programmers_That_Are_Teenagers = 0; for (i=0;i<9999999999;i++) { if (All_C_Programmers[i]=="Teenager") { num_Programmers_That_Are_Teenagers++; } } cout << num_Programmers_That_Are_Teenagers; ------------- 1 <------