CListBox::FindString int FindString( int nStartAfter, LPCTSTR lpszItem ) const;Return ValueThe zero-based index of the matching item, or LB_ERR if the search was unsuccessful.ParametersnStartAfterContains the zero-based index of the item before the first item to be searched. When the search reaches the bottom of the list box, it continues from the top of the list box back to the item specified by nStartAfter. If nStartAfter is –1, the entire list box is searched from the beginning. 这句:If nStartAfter is –1, the entire list box is searched from the beginning.
{
m_URLList.AddString(strCompany);
}
在CListBox 中
strCompany里的字符串没有重复的==LB_ERR,执行AddString(strCompany);
那-1表示什么?
下次看文档先
int FindString( int nStartAfter, LPCTSTR lpszItem ) const;Return ValueThe zero-based index of the matching item, or LB_ERR if the search was unsuccessful.ParametersnStartAfterContains the zero-based index of the item before the first item to be searched. When the search reaches the bottom of the list box, it continues from the top of the list box back to the item specified by nStartAfter. If nStartAfter is –1, the entire list box is searched from the beginning.
这句:If nStartAfter is –1, the entire list box is searched from the beginning.
非0表示TRUE