-
April 17th, 2013, 01:19 AM
#16
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?
Victor Nijegorodov
-
April 17th, 2013, 02:18 AM
#17
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??
Last edited by maxer; April 17th, 2013 at 02:21 AM.
-
April 17th, 2013, 02:49 AM
#18
Re: String passing between functions in VC++ SDI application
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.
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
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()?
Victor Nijegorodov
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|