Click here to Skip to main content
15,914,820 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question'lrint' equivalent? Pin
ns10-Sep-03 6:23
ns10-Sep-03 6:23 
AnswerRe: 'lrint' equivalent? Pin
David Crow10-Sep-03 6:55
David Crow10-Sep-03 6:55 
GeneralODBC Datasources Pin
si_6910-Sep-03 5:46
si_6910-Sep-03 5:46 
GeneralRe: ODBC Datasources Pin
David Crow10-Sep-03 6:13
David Crow10-Sep-03 6:13 
GeneralHTML syntax highlighting concepts Pin
mcguile25710-Sep-03 5:26
mcguile25710-Sep-03 5:26 
GeneralRe: HTML syntax highlighting concepts Pin
Phil Hamer10-Sep-03 9:20
Phil Hamer10-Sep-03 9:20 
GeneralPaiting inside a control Pin
JensB10-Sep-03 5:24
JensB10-Sep-03 5:24 
QuestionCListCtrl, how to iterate through all items? Pin
Anonymous10-Sep-03 5:21
Anonymous10-Sep-03 5:21 
Hi!

I have a list control and I want to read data from it line by line. I can easily read multiple lines of data if they are selected, like this:

POSITION pos = pList->GetFirstSelectedItemPosition();
if (pos != NULL)
   while (pos)
      nItem = pList->GetNextSelectedItem(pos);


How do I iterate through all the items whether or not any are selected and whether or not they are visible?

If I could find a function which returned the top-most item, I think I could then use the GetNext() function. There is a GetTopIndex() function but I think that only returns the top-most item that is visible.

Can anyone point out where I am going wrong?

Thank you.
AnswerRe: CListCtrl, how to iterate through all items? Pin
vcplusplus10-Sep-03 5:35
vcplusplus10-Sep-03 5:35 
AnswerRe: CListCtrl, how to iterate through all items? Pin
David Crow10-Sep-03 6:16
David Crow10-Sep-03 6:16 
GeneralRe: CListCtrl, how to iterate through all items? Pin
Anonymous10-Sep-03 6:40
Anonymous10-Sep-03 6:40 
GeneralXP Serial communication Pin
Arthur Westerman10-Sep-03 4:54
Arthur Westerman10-Sep-03 4:54 
GeneralcreateProcess questions Pin
ns10-Sep-03 4:46
ns10-Sep-03 4:46 
GeneralRe: createProcess questions Pin
Magnus Westin10-Sep-03 4:58
Magnus Westin10-Sep-03 4:58 
Generalerror Pin
ranjjj10-Sep-03 4:24
ranjjj10-Sep-03 4:24 
GeneralRe: error Pin
David Crow10-Sep-03 6:22
David Crow10-Sep-03 6:22 
GeneralWeird problem with FindFirstChangeNotification Pin
Magnus Westin10-Sep-03 3:16
Magnus Westin10-Sep-03 3:16 
GeneralHHeelp Pin
Member 42425910-Sep-03 3:13
Member 42425910-Sep-03 3:13 
GeneralRe: HHeelp Pin
valikac10-Sep-03 9:24
valikac10-Sep-03 9:24 
GeneralRe: HHeelp Pin
Member 42425910-Sep-03 19:12
Member 42425910-Sep-03 19:12 
GeneralRe: HHeelp Pin
valikac11-Sep-03 11:41
valikac11-Sep-03 11:41 
GeneralRe: HHeelp Pin
Phil Hamer10-Sep-03 9:25
Phil Hamer10-Sep-03 9:25 
GeneralRe: HHeelp Pin
Member 42425910-Sep-03 19:09
Member 42425910-Sep-03 19:09 
QuestionShape file source code ?? Pin
David Chamberlain10-Sep-03 2:31
David Chamberlain10-Sep-03 2:31 
AnswerRe: Shape file source code ?? Pin
JWood10-Sep-03 4:15
JWood10-Sep-03 4:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.