Retrieves the list element identified by rPos, then sets rPos to the POSITION value of the next entry in the list.
virtual CDocument* GetNextDoc( POSITION& rPos ) const = 0;
A pointer to the next document in the list of documents associated with this template.
- A reference to a POSITION value returned by a previous call to GetFirstDocPosition or GetNextDoc.
If the retrieved element is the last in the list, then the new value of rPos is set to NULL.
You can use GetNextDoc in a forward iteration loop if you establish the initial position with a call to GetFirstDocPosition.
You must ensure that your POSITION value represents a valid position in the list. If it is invalid, then the Debug version of the Microsoft Foundation Class Library asserts.