LAnnotationWindow::AnnSave
#include "ltwrappr.h"
virtual L_INT LAnnotationWindow::AnnSave(pszFile, nFormat=ANNFMT_XML, bSelected=FALSE)
L_TCHAR * pszFile; |
/* the name of the file to save */ |
L_INT nFormat; |
/* format for saving annotation data */ |
L_BOOL bSelected; |
/* flag that indicates which objects to save */ |
Saves annotations in the specified file.
Parameter |
Description |
|
pszFile |
Character string containing the name of the file to save. |
|
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. |
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
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
LTANN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
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(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; }