Item
It returns the n'th Page of the collection.
It returns page which has the given name.
PageBase Item( int nIndex )
PageBase Item( LPCSTR lpcszName )
the page corresponding to the supplied index.if nindex is invalid, page will be NULL
returns page with the given name. if lpcszName is invalid, page will be NULL
EX1
void CollectionEmbeddedPages_Item_Ex1() { Worksheet wks = Project.ActiveLayer(); if(!wks) return; CollectionEmbeddedPages embeddedPages(wks); int nCount = embeddedPages.Count(); int nIndex = nCount - 1; Page pg = embeddedPages.Item(nIndex); if(!pg) printf("Failed to get page"); }
EX2
void CollectionEmbeddedPages_Item_Ex2(string strPageName) { Worksheet wks = Project.ActiveLayer(); if(!wks) return; CollectionEmbeddedPages embeddedPages(wks); int nCount = embeddedPages.Count(); Page pg = embeddedPages.Item(strPageName); if(!pg) printf("Failed to get %s", strPageName); else printf("Got embedded page %s", strPageName); }
origin.h