#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnSetShowFlags(hObject, uShowFlags, uFlags)
Determines how the rulers will be displayed.
Handle to the annotation object.
Flag that indicates how to display the rulers. Possible values are:
Value | Meaning |
---|---|
0 | Do not display the ruler length or the ruler gauge or the tic marks. In this case, the ruler looks like a line. |
ANNSHOW_LENGTH | Display the ruler length. |
ANNSHOW_GAUGE | Display the ruler gauge. |
ANNSHOW_TICMARKS | Display the tic marks. |
Flags that determine which objects to process. Most of the flags apply only to container objects. You can combine values when appropriate by using a bitwise OR ( | ). The following are valid values:
Value | Meaning |
---|---|
0 | Process only the specified object. |
ANNFLAG_SELECTED | [0x0001] Process only objects that have the selected property set to TRUE. For getting and setting the selected property, use the L_AnnGetSelected and L_AnnSetSelected functions. |
ANNFLAG_NOTTHIS | [0x0004] Process only one level of objects within the specified container, not the container itself. If there are containers within the container, they are modified, but the objects within them are not. |
ANNFLAG_RECURSE | [0x0008] Process objects within a container, and within any subcontainers, down to any level. |
ANNFLAG_NOTCONTAINER | [0x0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves. |
ANNFLAG_NOINVALIDATE | [0x0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages. |
ANNFLAG_CHECKMENU | [0x0020] Process objects only if the ANNAUTOTEXT_MENU_SHOWRULER menu item has been selected. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function is valid for the following objects:
In addition, the Automation object stores the show flag settings along with the other object default settings.
For Protractor objects, the default value for uShowFlags
is 0. For the Ruler, PolyRuler, and Cross-Product objects the default value for uShowFlags is ANNSHOW_LENGTH | ANNSHOW_TICMARKS.
Required DLLs and Libraries
Win32, x64.
L_INT EXT_CALLBACK ShowFlagsAnnEnumCallback(HANNOBJECT hObject, L_VOID* pUserData)
{
UNREFERENCED_PARAMETER(pUserData);
L_UINT Type, ShowFlags;
L_AnnGetType(hObject, &Type);
switch(Type)
{
case ANNOBJECT_PROTRACTOR:
case ANNOBJECT_RULER:
case ANNOBJECT_CROSSPRODUCT:
case ANNOBJECT_AUTOMATION:
L_AnnGetShowFlags(hObject, &ShowFlags);
if (ShowFlags != 0)
ShowFlags = 0;
else
ShowFlags = ANNSHOW_LENGTH|ANNSHOW_GAUGE;
L_AnnSetShowFlags(hObject, ShowFlags, 0);
break;
default:
MessageBox(NULL, TEXT("This object is not a protractor, ruler, cross-product or automation object."), TEXT("Notice"), MB_OK);
}
return SUCCESS;
}
L_INT AnnSetShowFlagsExample(HANNOBJECT hContainer)
{
L_INT nRet;
nRet = L_AnnEnumerate(hContainer, (ANNENUMCALLBACK) ShowFlagsAnnEnumCallback, NULL, ANNFLAG_RECURSE|ANNFLAG_SELECTED, NULL);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document