CList template class ...
SALVATORE.LO-TURCO@st.com
Tuesday, January 16, 1996
Hi all,
I've had a lot of problems trying to implement a "Function" class made
up, among the others, of a list of CPoint using the
CList template class of the MFC release 3.0, with
Visual C++ 2.0 running under Windows NT 3.51.
In particular, one of these problem is because of calling
listOfPoint.AddTail, where listOfPoint is a list of CPoint: the pointer
pNewNode (resulting from a NewNode call in the implementation of the
AddTail method) sometimes asserts in the ASSERT_VALID(this) statement.
May be its because of my fault, but I'd like to know how it is going with
you with the CList template class, whether you too are having any problem
or not. Just to know if one should use this class template or, instead,
should avoid to use it (at least with the MFC release 3.0).
Thanks in advance.
Salvo
e-mail: salvatore.lo-turco@st.com
Mario Contestabile -- Mario_Contestabile.UOS__MTL@UOSMTL2.universal.com
Sunday, January 21, 1996
[Snip-Start()]
May be its because of my fault, but I'd like to know how it is going with
you with the CList template class, whether you too are having any problem
or not. Just to know if one should use this class template or, instead,
should avoid to use it (at least with the MFC release 3.0).
[Snip-End()]
Do not avoid or postpone its usage. The collection templates are one of the
most usefull things
in the Microsoft Foundation Classes. Look in the /advanced/collect example.
mcontest@universal.com
www.universal.com
Philip Liu -- pliu@pcmail.healthvision.ca
Monday, January 22, 1996
It was caused by that CPoint(), the constructor, is not called (?!)
in NewNode() and hence the ASSERT_VALID() asserts. For that
reason, CPoints hv to be created explicitly (thus destroyed) and
passed to the list.
P
----------
From: owner-mfc-l[SMTP:owner-mfc-l@netcom.com]
Sent: Tuesday, January 16, 1996 5:18 PM
To: mfc-l
Subject: CList template class ...
Hi all,
I've had a lot of problems trying to implement a "Function" class
made
up, among the others, of a list of CPoint using the
CList template class of the MFC release 3.0, with
Visual C++ 2.0 running under Windows NT 3.51.
In particular, one of these problem is because of calling
listOfPoint.AddTail, where listOfPoint is a list of CPoint: the
pointer
pNewNode (resulting from a NewNode call in the implementation of the
AddTail method) sometimes asserts in the ASSERT_VALID(this)
statement.
May be its because of my fault, but I'd like to know how it is going
with
you with the CList template class, whether you too are having any
problem
or not. Just to know if one should use this class template or,
instead,
should avoid to use it (at least with the MFC release 3.0).
Thanks in advance.
Salvo
e-mail: salvatore.lo-turco@st.com
Mike Blaszczak -- mikeblas@interserv.com
Wednesday, January 24, 1996
On Mon, 22 Jan 96, Philip Liu wrote:
>It was caused by that CPoint(), the constructor, is not called (?!)
>in NewNode() and hence the ASSERT_VALID() asserts. For that
>reason, CPoints hv to be created explicitly (thus destroyed) and
>passed to the list.
That makes it sound like the CList didn't have an appropriate
ConstructElements() function, or that the ConstructElements() function wasn't
working.
.B ekiM
--
TCHAR szReferee[] = "Look! A skating zebra!";
| Вернуться в корень Архива
|