Compartilhar via


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.

Requirements

Header: afxwin.h

See Also

Reference

CDocTemplate Class

Hierarchy Chart

CDocTemplate::GetFirstDocPosition

Other Resources

CDocTemplate Members