LAnnotationWindow::AnnSave
#include "ltwrappr.h"
virtual L_INT LAnnotationWindow::AnnSave(pszFile, nFormat=ANNFMT_NATIVE, bSelected=FALSE)
/* 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. This function is available in the Document/Medical Toolkits.
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 |
Use LEAD's own format for annotations. |
|
ANNFMT_WMF |
Use the Windows WMF format. |
|
ANNFMT_ENCODED |
Use the LEAD binary format. This file size is smaller and is upward compatible. It also provides better security. |
|
ANNFMT_XML |
Use the XML format. |
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_VOID MyFunction(HWND hParentWnd)
{
LAnnotationWindow MyLAnnotationWindow;
HWND hWnd=MyLAnnotationWindow.CreateWnd(hParentWnd);
if(hWnd!=NULL)
{
/*the function was successful */
/*do other processing*/
if(MyLAnnotationWindow.AnnSave(TEXT("MyAnn.Ann"))==SUCCESS)
MessageBox(0, TEXT("Saving Annotations Successful"), TEXT("Saving Annotations Successful"),MB_OK);
}
else
{
/* there is an error */
}
}