virtual HWND LAnnToolBar::Create(hWndParent, pPoint, uAlign, bVisible, uButtons=NULL, pButtons=NULL)
Creates an annotation toolbar in the specified window.
Handle to the parent window.
Pointer to the POINT structure that specifies the position of the new window in the parent window. Coordinates are relative to the parent window.
Value indicating which corner of the toolbar is located at pPoint. One of the following values:
For example, ANNTOOLALIGN_LEFT | ANNTOOLALIGN_TOP indicates that pPoint is the top left point of the toolbar.
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. |
Number of buttons that will be in the annotation toolbar. This value is valid only if pButtons is not NULL.
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.
Value | Meaning |
---|---|
>0 | Handle of the created toolbar. |
=NULL | An error occurred. Refer to Return Codes. |
Win32, x64.
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)
return ERROR_INVALID_PARAMETER;
}
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;
}
//...
//...
LeadAToolbar.Destroy();
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