Creates a digtalpaint toolbar.
#include "Ltwrappr.h"
static L_INT LRasterPaintWindow::CreateToolbar(pLToolbar, hWndParent, lpCaption)
Pointer to an LToolbar class object that references the newly created toolbar.
Window handle to the toolbar's parent window.
Pointer a null-terminated string to be used as the title for the toolbar window.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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 | ID_TOOL_PAINT_BRUSH | |
Line shape tool | ID_TOOL_PAINT_SHAPE_LINE | |
Rectangle shape tool | ID_TOOL_PAINT_SHAPE_RECT | |
Rounded rectangle shape tool | ID_TOOL_PAINT_SHAPE_ROUNDRECT | |
Ellipse shape tool | ID_TOOL_PAINT_SHAPE_ELLIPSE | |
Polygon shape tool | ID_TOOL_PAINT_SHAPE_POLYGON | |
Bezier shape tool | ID_TOOL_PAINT_SHAPE_BEZIER | |
Region rectangle tool | ID_TOOL_PAINT_REGION_RECT | |
Rounded rectangle region tool | ID_TOOL_PAINT_REGION_ROUNDRECT | |
Ellipse region tool | ID_TOOL_PAINT_REGION_ELLIPSE | |
Polygon region tool | ID_TOOL_PAINT_REGION_POLYGON | |
Surface region tool | ID_TOOL_PAINT_REGION_SURFACE | |
Border region tool | ID_TOOL_PAINT_REGION_BORDER | |
Color region tool | ID_TOOL_PAINT_REGION_COLOR | |
Surface fill tool | ID_TOOL_PAINT_FILL_SURFACE | |
Border fill tool | ID_TOOL_PAINT_FILL_BORDER | |
Color replace tool | ID_TOOL_PAINT_FILL_COLORREPLACE | |
Text tool | ID_TOOL_PAINT_TEXT | |
Zoom tool | ID_TOOL_PAINT_ZOOM | |
Border color picker tool | ID_TOOL_PAINT_BORDERCOLORPICKER | |
Mover tool | ID_TOOL_PAINT_MOVER |
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;
}