L_AnnGetRotateOptions
#include "l_bitmap.h"
L_INT EXT_FUNCTION L_AnnGetRotateOptions(hObject, pRotateOptions, uStructSize)
HANNOBJECT hObject; |
/* handle to the annotation object*/ |
pANNROTATEOPTIONS pRotateOptions; |
/* pointer to the ANNROTATEOPTIONS structure */ |
L_UINT uStructSize; |
/* size of the ANNROTATEOPTIONS structure */ |
Gets the rotation options for the specified annotation object. This function is available in the Document/Medical Toolkits.
Parameter |
Description |
hObject |
Handle to the annotation object. |
pRotateOptions |
Pointer to an ANNROTATEOPTIONS structure that specifies the rotate options to set. |
uStructSize |
Size in bytes, of the structure pointed to by pRotateOptions, for versioning. Use sizeof(ANNROTATEOPTIONS). |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Use this function to get the rotation options of any annotation object, including the automation object. To use this function, declare a variable a type ANNROTATEOPTIONS, and pass the address of this variable as the second argument. For more information, refer to the documentation for the structure ANNROTATEOPTIONS.
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. |
Platforms
Windows 95 / 98 / Me, Windows 2000 / XP.
See Also
Functions: |
|
Topics: |
Annotation Functions: Getting and Setting the Rotation Options |
|
Example
// This example displays if the annotation object displays
// rotate handles. If displaying rotate handles, the object
// is changed so that it does not display rotate handles.
// If not displaying rotate handles, the object is changed
// so that it displays rotate handles
L_INT ExampleAnnGetRotateOptions(HANNOBJECT hObject)
{
L_INT nRet;
L_CHAR szMsg[200];
ANNROTATEOPTIONS RotateOptions;
memset(&RotateOptions, 0, sizeof(ANNROTATEOPTIONS));
RotateOptions.uStructSize = sizeof(ANNROTATEOPTIONS);
RotateOptions.uFlags = ANNROTATE_SHOW_ROTATE_HANDLES;
RotateOptions.nReserved = 0;
nRet = L_AnnGetRotateOptions(hObject, &RotateOptions, sizeof(ANNROTATEOPTIONS));
if (nRet != SUCCESS)
return nRet;
wsprintf(szMsg, "Old State: bShowRotateHandles: %s", RotateOptions.bShowRotateHandles ? "TRUE" : "FALSE");
MessageBox(NULL, szMsg, "", MB_OK);
// Change the state
RotateOptions.bShowRotateHandles = !RotateOptions.bShowRotateHandles;
nRet = L_AnnSetRotateOptions(hObject, &RotateOptions, 0);
if (nRet != SUCCESS)
return nRet;
nRet = L_AnnGetRotateOptions(hObject, &RotateOptions, sizeof(ANNROTATEOPTIONS));
if (nRet != SUCCESS)
return nRet;
wsprintf(szMsg, "New State: bShowRotateHandles: %s", RotateOptions.bShowRotateHandles ? "TRUE" : "FALSE");
MessageBox(NULL, szMsg, "", MB_OK);
return SUCCESS;
}