【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.4.34.23 PageBase::SaveTemplate
Contents
Description
Save project as template, including optional description and bitmap for image preview, can view templates from the Template Organizer.
Syntax
BOOL SaveTemplate( LPCSTR lpcszFile, LPCSTR lpcszBmpFile = NULL, LPCSTR lpcszEMFFile = NULL, LPCSTR lpcszDesc = NULL, DWORD dwCtrl = 0x0 )
Parameters
- lpcszFile
- [input]Full path to the template file to save to
- lpcszBmpFile
- [input]Full path to the bitmap file to saved into the template, viewable from template organizer. Can be NULL.
- lpcszEMFFile
- [input]Full path to the emf file to saved into the template, viewable from template organizer. Can be NULL.
- lpcszDesc
- [input]Description to be saved into the template, viewable from template organizer. Can be NULL
- dwCtrl
- [input]internal used only.
Return
Returns TRUE on success and FALSE on failure.
Examples
EX1
// save a project as a template, including a description and image preview. void PageBase_SaveTemplate_ex1() { string strBmpFile = "c:\\mybitmap.bmp"; string strTemplateEMF = "c:\\metafile.emf"; string strTemplateFile = "c:\\mytemplate.otp"; string strDescription="Description of template goes here---"; GraphPage pg; pg.Create("origin"); if( pg ) { if(pg.SaveBitmap(strBmpFile, 400)) pg.SaveTemplate(strTemplateFile, strBmpFile, NULL, strDescription); if(pg.SaveBitmap(strTemplateEMF)) pg.SaveTemplate(strTemplateFile, NULL, strTemplateEMF, strDescription); // note: the last non NULL description saved overwrites earlier description. } }
Remark
See Also
Header to Included
origin.h