#include "ltwrappr.h"

virtual HWND LAnnToolBar::Create(hWndParent, pPoint, uAlign, bVisible, uButtons=NULL, pButtons=NULL)

HWND hWndParent;

handle to the parent window


pointer to the POINT structure

L_UINT uAlign;

constant for the toolbar allignment

L_BOOL bVisible;

flag that indicates whether the toolbar will be visible

L_UINT uButtons;

number of buttons the toolbar will have

pANNBUTTON pButtons;

array of ANNBUTTON structures that contain toolbar button information

Creates an annotation toolbar in the specified window.

Parameter Description
hWndParent Handle to the parent window.
pPoint Pointer to the POINT structure that specifies the position of the new window in the parent window. Coordinates are relative to the parent window.
uAlign Value indicating which corner of the toolbar is located at pPoint. One of the following values:
  must be combined using the bitwise OR with one of these values:
  For example, ANNTOOLALIGN_LEFT|ANNTOOLALIGN_TOP indicates that pPoint is the top left point of the toolbar.
bVisible Flag that indicates whether the toolbar will be visible. Possible values are:
  Value Meaning
  TRUE Toolbar will be visible.
  FALSE Toolbar will not be visible.
uButtons Number of buttons that will be in the annotation toolbar. This value is valid only if pButtons is not NULL.
pButtons Array of ANNBUTTON structures that contain information about the tool buttons to include in the annotation toolbar. If this is NULL, the default annotation toolbar will be created.



Handle of the created toolbar.


An error occurred. Refer to Return Codes.

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


LAnnotation::SetOptions, Class Members


Annotation Functions: Implementing Automation


Implementing Annotations


Automated User Interface for Annotations


Key Annotation Features


L_INT LAnnToolBar_CreateExample(HWND hWndParent) 
   LAnnToolBar LeadAToolbar ; 
   HWND hWnd ; 
   POINT Point ; 
   L_UINT uChecked ; 
   L_INT nRet; 
   if (LeadAToolbar.IsCreated() == FALSE) 
      Point.x = 10 ; 
      Point.y = 10 ; 
      HWND hWnd = LeadAToolbar.Create(hWndParent,&Point, ANNTOOLALIGN_LEFT | ANNTOOLALIGN_TOP, TRUE) ; 
      if(hWnd == NULL) 
   hWnd = LeadAToolbar.GetWndHandle(); 
   if (hWnd == NULL) 
      MessageBox(NULL,TEXT("A ToolBar was not created ..."),TEXT("Notice"),MB_OK) ; 
      return FAILURE; 
   if (LeadAToolbar.IsButtonVisible(ANNTOOL_LINE) == FALSE) 
      nRet = LeadAToolbar.SetButtonVisible(ANNTOOL_LINE,TRUE); 
      if(nRet != SUCCESS) 
         return nRet; 
   uChecked = LeadAToolbar.GetToolChecked() ; 
   if (uChecked != ANNTOOL_LINE) 
      nRet = LeadAToolbar.SetToolChecked(ANNTOOL_LINE) ; 
      if(nRet != SUCCESS) 
         return nRet; 
   return SUCCESS; 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help