AddPage Example for C++ 5.0 and later
void CSample_COMDlg::OnButton3()
{
short nPageNumber = 0;
int nPageCount = 0;
CString csBuffer;
nPageNumber = 1;
int nRet = pRasterDoc->AddPage (pRaster, nPageNumber);
if(nRet == 0)
AfxMessageBox(TEXT("The engine added a new page to the document."));
else
AfxMessageBox(TEXT("The engine could not add a new page to the document."));
nPageCount = pRasterDoc->PageCount;
csBuffer.Format (TEXT("The number of pages in the document is: %d"),nPageCount);
AfxMessageBox(csBuffer);
}