This topic has not yet been rated - Rate this topic

CDocTemplate::GetNextDoc

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;

Return Value

A pointer to the next document in the list of documents associated with this template.

Parameters

rPos
A reference to a POSITION value returned by a previous call to GetFirstDocPosition or GetNextDoc.

Remarks

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.

See Also

CDocTemplate Overview | Class Members | Hierarchy Chart | CDocTemplate::GetFirstDocPosition

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.