LAnnotationWindow::AnnSave

#include "ltwrappr.h"

virtual L_INT LAnnotationWindow::AnnSave(pszFile, nFormat=ANNFMT_XML, bSelected=FALSE)

Saves annotations in the specified file.

Parameters

L_TCHAR * pszFile

Character string containing the name of the file to save.

L_INT nFormat

Format for saving annotation data. Possible values are:

Value Meaning
ANNFMT_NATIVE NOTE: This format has been replaced with ANNFMT_XML. Annotation files can no longer be saved in this format.
ANNFMT_WMF Use the Windows WMF format.
ANNFMT_ENCODED NOTE: This format has been replaced with ANNFMT_XML. Annotation files can no longer be saved in this format.
ANNFMT_XML Use the XML format.  This is the default value.

L_BOOL bSelected

Flag that indicates which objects to save. Possible values are:

Value Meaning
TRUE Save all objects that have the selected property set to TRUE. For getting and setting the selected property, use the LAnnContainer::GetSelectItems and LAnnotation::SetSelected functions.
FALSE Save only the specified object.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Save annotations in the WMF format only for use in another application. LEADTOOLS reads annotations only in the native format.

To retain scaling and positioning information, this function always saves the root container, along with the specified object or selected objects. Use the bSelected parameter as follows:

To save only selected objects in the container, set bSelected to TRUE.

To save all objects in the container, set bSelected to FALSE.

For information on saving annotations as a tag in a TIFF file, refer to LAnnContainer::SaveTag.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LAnnotationWindow_AnnSaveExample(HWND hParentWnd) 
{ 
	L_INT nRet; 
 
   LAnnotationWindow MyLAnnotationWindow; 
 
   HWND hWnd=MyLAnnotationWindow.CreateWnd(hParentWnd); 
 
     if(hWnd!=NULL) 
     { 
         /*the function was successful */ 
 
         /*do other processing*/ 
        nRet = MyLAnnotationWindow.AnnSave(MAKE_IMAGE_PATH(TEXT("MyAnn.Ann"))); 
        if(nRet==SUCCESS) 
				MessageBox(0, TEXT("Saving Annotations Successful"), TEXT("Saving Annotations Successful"),MB_OK); 
		  else 
			  return nRet; 
     } 
 
     else 
	  { 
           /* there is an error */ 
		  return FAILURE; 
     } 
	return SUCCESS; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help