【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.4.4.4 CollectionEmbeddedPages::Item
Contents
Description
It returns the n'th Page of the collection.
It returns page which has the given name.
Syntax
PageBase Item( int nIndex )
PageBase Item( LPCSTR lpcszName )
Parameters
- nIndex
- [input] 0-offset index of the requested page in the collection.
- lpcszName
- [input] the name of the desired page.
Return
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
Examples
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); }
Remark
See Also
Header to Include
origin.h