Click here to Skip to main content
15,890,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: copying an array of bytes to another array Pin
David Crow3-Mar-06 6:05
David Crow3-Mar-06 6:05 
AnswerRe: copying an array of bytes to another array Pin
chaitanya223-Mar-06 6:09
chaitanya223-Mar-06 6:09 
QuestionPARAFORMAT2 Structure Pin
Richard_483-Mar-06 5:10
Richard_483-Mar-06 5:10 
AnswerRe: PARAFORMAT2 Structure Pin
Jeremy Falcon3-Mar-06 7:26
professionalJeremy Falcon3-Mar-06 7:26 
QuestionStack overflows Pin
Waldermort3-Mar-06 4:14
Waldermort3-Mar-06 4:14 
AnswerRe: Stack overflows Pin
David Crow3-Mar-06 4:33
David Crow3-Mar-06 4:33 
GeneralRe: Stack overflows Pin
Waldermort3-Mar-06 4:57
Waldermort3-Mar-06 4:57 
QuestionRe: Stack overflows Pin
David Crow3-Mar-06 5:56
David Crow3-Mar-06 5:56 
This does not even show that add_list_item() is being called at the time of the stack overflow. It's almost like the code is having trouble accessing one of the vector items. What if you print out the contents of the vector like:

for (long i = 0; i < rec.size(); i++)
{    
    OutputDebugString(rec[i].text);    
    OutputDebugString("\r\n");
}
The second thing to try is adding the items outside of the for loop like:

add_list_item(0, 0,0,rec[0].text);
add_list_item(1, 0,0,rec[1].text);
...
add_list_item(33, 0,0,rec[33].text);
Try also removing the calls to ListView_SetColumnWidth() and InvalidateRect(). What happens if you did something like:

for (long i = 32; i < rec.size(); i++)
    add_list_item(i - 32, 0, 0, rec[i].text);
which starts with the 33rd item in the vector.


"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

"There is no death, only a change of worlds." - Native American Proverb


AnswerRe: Stack overflows Pin
Waldermort3-Mar-06 6:18
Waldermort3-Mar-06 6:18 
QuestionRe: Stack overflows Pin
David Crow3-Mar-06 6:35
David Crow3-Mar-06 6:35 
AnswerRe: Stack overflows Pin
Waldermort3-Mar-06 15:59
Waldermort3-Mar-06 15:59 
GeneralRe: Stack overflows Pin
Waldermort3-Mar-06 5:53
Waldermort3-Mar-06 5:53 
QuestionRe: Stack overflows Pin
David Crow3-Mar-06 5:59
David Crow3-Mar-06 5:59 
AnswerRe: Stack overflows Pin
Waldermort3-Mar-06 6:28
Waldermort3-Mar-06 6:28 
Questionstd c++ structures Pin
Peter Charlesworth3-Mar-06 3:29
Peter Charlesworth3-Mar-06 3:29 
AnswerRe: std c++ structures Pin
Cedric Moonen3-Mar-06 3:38
Cedric Moonen3-Mar-06 3:38 
GeneralRe: std c++ structures Pin
Peter Charlesworth3-Mar-06 12:02
Peter Charlesworth3-Mar-06 12:02 
AnswerRe: std c++ structures Pin
Maximilien3-Mar-06 3:39
Maximilien3-Mar-06 3:39 
GeneralRe: std c++ structures Pin
Peter Charlesworth3-Mar-06 12:06
Peter Charlesworth3-Mar-06 12:06 
AnswerRe: std c++ structures Pin
toxcct3-Mar-06 3:49
toxcct3-Mar-06 3:49 
GeneralRe: std c++ structures Pin
Peter Charlesworth3-Mar-06 12:04
Peter Charlesworth3-Mar-06 12:04 
AnswerRe: std c++ structures Pin
markkuk3-Mar-06 12:18
markkuk3-Mar-06 12:18 
GeneralRe: std c++ structures Pin
Peter Charlesworth3-Mar-06 12:29
Peter Charlesworth3-Mar-06 12:29 
QuestionDoes kernel driver can invoke GetLogicalDriveStrings()? Pin
momer3-Mar-06 3:20
momer3-Mar-06 3:20 
Questionchanging brush attributes at runtime Pin
pc_dev3-Mar-06 2:09
pc_dev3-Mar-06 2:09 

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.