Re: String passing between functions in VC++ SDI application
Define "not working".
- What does
Code:
int nItem = ctlRightView.GetItemCount();
return? - What does
Code:
int index = ctlRightView.InsertItem(nItem, league);
return? - Why do you every time insert the column 1? Where and how did you insert the column 0?
Re: String passing between functions in VC++ SDI application
During the first call of Display()
Code:
int nItem = ctlRightView.GetItemCount();
this one returns 0
Code:
int index = ctlRightView.InsertItem(nItem, league);
this also return 0
Output is
First(column name)
brother
..................................................
and the when the second tokenozed opens comes it again calls Display()
both the above code returns 0 only. i see only
First(column name)
man
but not
First(column name)
man
brother
-----------------------------------------
Answer for ur 3rd ques: Like i call insertcolumn in index 0 only how do i stop thatInsertColumn() function call alone while second time this Display() is called??
Re: String passing between functions in VC++ SDI application
Quote:
Originally Posted by
maxer
During the first call of Display()
Code:
int nItem = ctlRightView.GetItemCount();
this one returns 0
Code:
int index = ctlRightView.InsertItem(nItem, league);
this also return 0
Output is
First(column name)
brother
Good! It is correct and as expected.
Quote:
Originally Posted by
maxer
and the when the second tokenozed opens comes it again calls Display()
both the above code returns 0 only. i see only
First(column name)
man
but not
First(column name)
man
brother
Well, if GetItemCount() returns zero than either you have deleted the item before this call or you "occasionally" created another list control :confused:
Quote:
Originally Posted by
maxer
Answer for ur 3rd ques: Like i call insertcolumn in index 0 only how do i stop thatInsertColumn() function call alone while second time this Display() is called??
But why do you insert new column every time you are going to insert a new item? Why not to do it once somewhere in OnInitialUpdate()?