[VC ++ 6.0] [MFC] How does clistctrl select an item in the list?
The poster infineoncoc (infineon) was eager to ask questions in VC/mfc/basic at 12:14:27 ~~~~~~~~ In listctrlProgramEach item in the list will be automatically executed in sequence, so you need to automatically scroll (or select) to the item currently executed, but if there are too many items, you will not be able to see the pull. I tried using the m_list.sethostitem (nitem) method, but it is useless. Could you please tell me what other methods can be used to automatically roll to the current item, so as to display the number of problem points: 20. replies: the first floor of the 3rd floor of the bertbaker (golden generation) was posted at 12:45:44, with a score of 10 ensurevisible Top 2 floor sgnaw (Li Xiaoyao) and a score of 10 bool cmylistctrldlg at 12:56:16 :: oninitdialog () {cdialog: oninitdialog ();//... // set the m_listctrl.setextendedstyle (lvs_ex_fullrowselect | lvs_editlabels );//...} // select nitem extract (nitem, true); m_listctrl.setitemstate (nitem, lvis_selected, lvis_selected) in the program; top 3 floor hansin (split the iceberg) Replies to 12:57:04 score 0 clistctrl:: ensurevisible