#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnIsFixedInRect(hObject, prc, pbFixedInRect, uFlags)


handle to the annotation object


address of variable representing client area

L_BOOL *pbFixedInRect;

address of variable to be updated

L_UINT uFlags;

flags that determine which objects to process

Indicates whether there are any fixed annotations in the client rectangle prc.

Parameter Description
hObject Handle to the annotation object.
prc Address of a RECT variable representing a client area of a window. This can be NULL. For more information, see Comments below.
pbFixedInRect Pointer to a variable to be updated with a value that indicates whether hObject is fixed and in the client area represented by prc. Possible values are:
  Value Meaning
  TRUE There is a fixed annotation object in the client area.
  FALSE There are no fixed annotation objects in the client area.
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:






Process only the specified object.



[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.



[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.



[0x0008] Process objects within a container, and within any subcontainers, down to any level.



[0x0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves.



[0x0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages.



[0x0020] Process objects only if the ANNAUTOTEXT_MENU_TEXT menu item has been selected.



The function was successful.

< 1

An error occurred. Refer to Return Codes.


This function is used primarily as an aid in scrolling annotations without using double buffering. For more information on double buffering, see the documentation for:






A successful call to L_AnnIsFixedInRect will update pbFixedInRect with TRUE if hObject intersects with prc and hObject is fixed. If prc is NULL, then pbFixedInRect is updated with TRUE if hObject is fixed.

It is useful to pass an annotation container object for parameter hObject, along with the uFlags equal to ANNFLAG_RECURSE. Then pbFixedInRect is updated with TRUE if ANY annotation object intersects with prc. If prc is NULL in this case, then pbFixedInRect is updated with TRUE if ANY fixed object exists in the container.

Fixed annotations are independent of the annotation container scalarX, scalarY, offsetX and offsetY properties. The result is that they do not scroll or move with the underlying image. For more information, refer to L_AnnSetScalarX, L_AnnSetScalarY, L_AnnSetOffsetX, and L_AnnSetOffsetY. For more information, refer to Fixed Annotations.

Required DLLs and Libraries


For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.


Win32, x64.

See Also


L_AnnGetFixed, L_AnnPopFixedState, L_AnnPushFixedState, L_AnnSetFixed, L_AnnGetTextFixedSize, L_AnnSetTextFixedSize, L_AnnGetLineFixedWidth, L_AnnSetLineFixedWidth


Annotation Functions: Object Properties


Annotation Objects - Default Values


Annotation Objects - Automated Features


Implementing an Automated Annotation Program


Implementing a Non-automated Annotation Program


Fixed Annotations


Minimizing Flicker With Double Buffering


Annotation Functions (Document/Medical only): Getting and Setting the Fixed Property


This Example displays a message box telling if there are any fixed annotations visible in the client area of hWnd. This is useful for handling scrolling and zooming of fixed annotations without double-buffering. hWnd -- window displaying annotations hContainer -- handle to the annotation container

L_INT AnnIsFixedInRectExample(HWND hWnd,HANNOBJECT hContainer) 
   RECT     rcClient; 
   L_BOOL   bFixedInRect; 
   L_INT    nRet; 
   L_TCHAR* pszMsg; 
   GetClientRect(hWnd, &rcClient); 
   nRet = L_AnnIsFixedInRect(hContainer, &rcClient, &bFixedInRect, ANNFLAG_RECURSE); 
   if (nRet == SUCCESS) 
      pszMsg = bFixedInRect ? TEXT("There are fixed annotations visible") : TEXT("There are NO fixed annotations visible"); 
      MessageBox(NULL, pszMsg, TEXT(""), MB_OK); 
      return nRet; 
   return SUCCESS; 

Help Version 20.0.2019.3.12
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help