I'v tried this before, but couldn't get it to work. For a piece of software I'm working on now it would be very nice if I could watch the contents of a CTypedPtrArray, but something in VS.NET doesn't seem to wanna do this...

With a regular CArray things are easy enough...
Code:
class MyClass
{
// blabla
};

CArray <MyClass, MyClass&> m_aMC;
If you wanted to watch the first 4 items, you'd add a watch for:
m_aMC.m_pData,4
Even a watch from somewhere in the middle isn't a problem.
&m_aMC.m_pData[20],4

Even if you created the CArray to store pointers (with: CArray <MyClass*, MyClass*> m_aMC, somewhat simulating the working of CTypedPtrArray) things work well.

But, suppose I did
CTypedPtrArray <CPtrArray, MyClass*> m_aTP;
Then I can't seem to be able to add a watch to more than 1 item at a time.
Watching the 3rd element can be done with adding a watch for:
(MyClass*)*(&m_aTP.m_pData[2])
But adding an amount as in
(MyClass*)*(&m_aTP.m_pData[2]),4
gives me a correct result only for the first element listed, the others aren't correct.


Anyone have a clue as to how to do this ?