LRasterPaintWindow::CreateToolbar

#include "Ltwrappr.h"

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

LToolbar * pLToolbar;

/* pointer to an LToolbar class object */

HWND hWndParent;

/* window handle */

L_TCHAR * lpCaption;

/* window title string */

Creates a digtalpaint toolbar.

Parameter

Description

pLToolbar

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

hWndParent

Window handle to the toolbar's parent window.

lpCaption

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

Returns

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:

Description

Button ID

image\Apbrush.gif Paintbrush tool

ID_TOOL_PAINT_BRUSH

image\Alinetool.gif Line shape tool

ID_TOOL_PAINT_SHAPE_LINE

image\Arecttool.gif Rectangle shape tool

ID_TOOL_PAINT_SHAPE_RECT

image\RndRctTl.gif Rounded rectangle shape tool

ID_TOOL_PAINT_SHAPE_ROUNDRECT

image\EllipseTl.gif Ellipse shape tool

ID_TOOL_PAINT_SHAPE_ELLIPSE

image\PylgnTool.gif Polygon shape tool

ID_TOOL_PAINT_SHAPE_POLYGON

image\Bezier.gif Bezier shape tool

ID_TOOL_PAINT_SHAPE_BEZIER

image\Rectrgn.gif Region rectangle tool

ID_TOOL_PAINT_REGION_RECT

image\RndRctRgn.gif Rounded rectangle region tool

ID_TOOL_PAINT_REGION_ROUNDRECT

image\EllpsRgn.gif Ellipse region tool

ID_TOOL_PAINT_REGION_ELLIPSE

image\PlygnRgn.gif Polygon region tool

ID_TOOL_PAINT_REGION_POLYGON

image\SurfRgn.gif Surface region tool

ID_TOOL_PAINT_REGION_SURFACE

image\BordRgn.gif Border region tool

ID_TOOL_PAINT_REGION_BORDER

image\ColorRgn.gif Color region tool

ID_TOOL_PAINT_REGION_COLOR

image\SurfFill.gif Surface fill tool

ID_TOOL_PAINT_FILL_SURFACE

image\BordFill.gif Border fill tool

ID_TOOL_PAINT_FILL_BORDER

image\ClrRplc.gif Color replace tool

ID_TOOL_PAINT_FILL_COLORREPLACE

image\TextTool.gif Text tool

ID_TOOL_PAINT_TEXT

image\Zoom.gif Zoom tool

ID_TOOL_PAINT_ZOOM

image\BdrClrPkr.gif Border color picker tool

ID_TOOL_PAINT_BORDERCOLORPICKER

image\MovrTool.gif Mover tool

ID_TOOL_PAINT_MOVER

Required DLLs and Libraries

LTPNT
LTDIS
LTFIL
LTAUT
LTCON
LTTLB

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

See Also

Functions:

LRasterPaintWindow::Initialize, LRasterPaintWindow::FreeToolbar

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;
}