LRasterPaintWindow::CreateToolbar

#include "Ltwrappr.h"

static L_INT LRasterPaintWindow::CreateToolbar(pLToolbar, hWndParent, lpCaption)

Creates a digtalpaint toolbar.

Parameters

LToolbar * pLToolbar

Pointer to an LToolbar class object that references the newly created toolbar.

HWND hWndParent

Window handle to the toolbar's parent window.

L_TCHAR * lpCaption

Pointer a null-terminated string to be used as the title for the toolbar window.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The toolbar is created as a child window to the window specified in hwndParent.

LRasterPaintWindow::Initialize must be called before calling this function.

Please note that this DigitalPaint toolbar is an automation toolbar. This toolbar automatically handles the buttons and the necessary function calls. However, the handle of the toolbar must be set by calling LRasterPaintWindow::SetToolbar, before using the toolbar.

The digitalpaint toolbar contains the following buttons:

Icon Description Button ID
Paintbrush tool
Paintbrush tool ID_TOOL_PAINT_BRUSH
Line shape tool
Line shape tool ID_TOOL_PAINT_SHAPE_LINE
Rectangle shape tool
Rectangle shape tool ID_TOOL_PAINT_SHAPE_RECT
Rounded rectangle shape tool
Rounded rectangle shape tool ID_TOOL_PAINT_SHAPE_ROUNDRECT
Ellipse shape tool
Ellipse shape tool ID_TOOL_PAINT_SHAPE_ELLIPSE
Polygon shape tool
Polygon shape tool ID_TOOL_PAINT_SHAPE_POLYGON
Bezier shape tool
Bezier shape tool ID_TOOL_PAINT_SHAPE_BEZIER
Region rectangle tool
Region rectangle tool ID_TOOL_PAINT_REGION_RECT
Rounded rectangle region tool
Rounded rectangle region tool ID_TOOL_PAINT_REGION_ROUNDRECT
Ellipse region tool
Ellipse region tool ID_TOOL_PAINT_REGION_ELLIPSE
Polygon region tool
Polygon region tool ID_TOOL_PAINT_REGION_POLYGON
Surface region tool
Surface region tool ID_TOOL_PAINT_REGION_SURFACE
Border region tool
Border region tool ID_TOOL_PAINT_REGION_BORDER
Color region tool
Color region tool ID_TOOL_PAINT_REGION_COLOR
Surface fill tool
Surface fill tool ID_TOOL_PAINT_FILL_SURFACE
Border fill tool
Border fill tool ID_TOOL_PAINT_FILL_BORDER
Color replace tool
Color replace tool ID_TOOL_PAINT_FILL_COLORREPLACE
Text tool
Text tool ID_TOOL_PAINT_TEXT
Zoom tool
Zoom tool ID_TOOL_PAINT_ZOOM
Border color picker tool
Border color picker tool ID_TOOL_PAINT_BORDERCOLORPICKER
Mover tool
Mover tool ID_TOOL_PAINT_MOVER

Required DLLs and Libraries

See Also

Functions

Example

L_INT LRasterPaintWindow_CreateToolbarExample(LRasterPaintWindow *pLRasterPntWnd, LToolbar * pLToolbar, HWND hWnd, POINT ptPos) 
{ 
   L_INT nRet; 
 
   nRet = LRasterPaintWindow::Initialize (); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   if (pLRasterPntWnd->IsValid ()) 
   { 
      nRet = LRasterPaintWindow::CreateToolbar(pLToolbar, hWnd, TEXT("Test Toolbar")); 
      if(nRet != SUCCESS) 
         return nRet; 
 
      nRet = LRasterPaintWindow::SetToolbar (pLToolbar); 
      if(nRet != SUCCESS) 
         return nRet; 
 
      nRet = LRasterPaintWindow::SetToolbarPosition (&ptPos); 
      if(nRet != SUCCESS) 
         return nRet; 
 
      nRet = LRasterPaintWindow::ShowToolbar (TRUE); 
      if(nRet != SUCCESS) 
         return nRet; 
 
   } 
   else 
      return FAILURE; 
 
   return SUCCESS; 
} 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DigitalPaint C++ Class Library Help