#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnSetShowFlags(hObject, uShowFlags, uFlags)
HANNOBJECT hObject; |
/* handle to the annotation object */ |
L_UINT uShowFlags; |
/* flag that indicates how to display the rulers */ |
L_UINT uFlags; |
/* flags that determine which objects to process */ |
Determines how the rulers will be displayed.
Parameter |
Description |
|
hObject |
Handle to the annotation object. |
|
uShowFlags |
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. |
uFlags |
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. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function is valid for the following objects:
ANNOBJECT_CROSSPRODUCT
ANNOBJECT_POLYRULER
ANNOBJECT_PROTRACTOR
ANNOBJECT_RULER
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
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
Win32, x64.
See Also
Functions: |
|
Topics: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
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; }