Introduction

The LEADTOOLS Toolbar Class Library provides dynamic link library (DLL) functions to let you incorporate toolbars into your Windows applications. The LEADTOOLS Toolbar Class Library provides a means of creating and customizing user-defined toolbars. When used with the LEADTOOLS Automation Class Library it provides a means for conveniently adding Vector and Paint automated toolbars for drawing and painting.

The toolkit comes in WIN32 editions so that it can support development of software applications for any of the following environments:

Windows WIN32s 3.x

Windows 3.x NT

Windows 4.x NT

Windows 95

Windows 2000

Please note that if you have purchased an eval version of a LEADTOOLS toolkit, this help file contains the same information as the help file included in the standard release toolkit. Consequently, references to the .DLL and .LIB files contain an N designation. The .DLL and .LIB files included with the evaluation toolkit contain an E designation. Therefore, any references in the help file to xx14N.DLL or xx_N.LIB files refer to the corresponding xx14E.DLL or xx_E.LIB files. For example, if the help file refers to LTBAR14N.DLL, your corresponding file is LTBAR14E.DLL.


Example Programs

The following example programs are in separate EXAMPLES\CLASSLIB\ subdirectories (such as C:\LEAD14\EXAMPLES\CLASSLIB\DEMO). The executable files for these examples were compiled with Document/Medical capabilities of the toolkit. To get Document/Medical capabilities, you must buy the LEADTOOLS Document/Medical toolkit. Otherwise, if you recompile the examples, the resulting executable files will not have the Document/Medical capabilities.

Note:

You can run the example programs on your system by clicking the appropriate buttons in online help. If you try to run an example program that is not on your system, an error message will appear.

VECTOR DEMO

Vector Demo is the main vector example program. It uses pull-down menus to demonstrate most of the LEADTOOLS Vector features in one application. This program was compiled using a Microsoft compiler.


Version History

Current version: | 14.5
Last update: | October 20, 2005

Changes from Version 14 to Version 14.5

Changes from Version 13 to Version 14.

Changes from Version 12.1 to Version 13.

Changes from Version 12 to Version 12.1

Version 12


Changes from Version 14 to Version 14.5

Version 14.5 of the LEADTOOLS Toolbar Class Library has not changed from Version 14.


Changes from Version 13 to Version 14

Version 14 of the LEADTOOLS Toolbar Class Library has changed from Version 13 as follows:

LEADTOOLS Toolbar Class Library now supports UNICODE.

Changed functions:

The following functions have been changed from the previous version of LEADTOOLS Toolbar Class Library:

LToolbar::GetButtonInfo (1 new or changed parameter)

LToolbar::GetToolbarInfo (1 new or changed parameter)

Changed structures:

The following structures have been changed from the previous version of LEADTOOLS Toolbar Class Library:

LBUTTONINFO (1 member's name changed)

LTOOLBARINFO (1 member's name changed)

LTOOLBARTOOL (1 member's name changed)


Changes from Version 12.1 to Version 13

Version 13 of the LEADTOOLS Toolbar Class Library has not changed from Version 12.1.


Changes from Version 12 to Version 12.1

Version 12.1 of the LEADTOOLS Toolbar Class Library has changed from Version 12 as follows:

LEADTOOLS now supports toolbar functionality for the LEADTOOLS DigitalPaint toolkits.


Version 12

Version 12 is the first version of the LEADTOOLS Toolbar Class Library.

The rest of the topic lists the new functions:

LToolbar::AddButton

LToolbar::Create

LToolbar::EnableToolBarCallBack

LToolbar::Free

LToolbar::FreeToolbarInfo

LToolbar::GetButtonChecked

LToolbar::GetButtonInfo

LToolbar::GetPosition

LToolbar::GetRows

LToolbar::GetToolbarInfo

LToolbar::Initialize

LToolbar::IsButtonEnabled

LToolbar::IsButtonVisible

LToolbar::IsValid

LToolbar::IsVisible

LToolbar::RemoveButton

LToolbar::SetButtonChecked

LToolbar::SetButtonEnabled

LToolbar::SetButtonInfo

LToolbar::SetButtonVisible

LToolbar::SetPosition

LToolbar::SetRows

LToolbar::SetToolbarInfo

LToolbar::SetVisible

LToolbar::ToolBarCallBack


Copyright notice

Copyright Notices

©Copyright LEAD Technologies, Inc. 1991-2005. ALL RIGHTS RESERVED

Portions of the PCDLIB32.DLL, PCDLIB.DLL, LFFPX7.DLL, LFKODAK.DLL, EKFPIXJPEG140.DLL, PDC_SDK.DLL, PROFIRE.DLL, DC120V154_32.DLL, LFDCR14N.DLL, DCSPROBACK.DLL, DCSPRO3SLR.DLL, LFDCS14N.DLL, and LFKDC14N.DLL files contain material that is ©Copyright Eastman Kodak Company, 1996-2001. This software is based in part on the work of the Independent JPEG Group.

Portions of the LFCRW14N.DLL, LTCMP14.DLL, CDSDK.reg, CDSDK.dll, CDRAPCLS.dll, czs_ui.dll, deimg.dll, deImg010.dll, deImg110.dll, deImg153.dll, deimg301.dll, deimg401.dll, deImg404.dll, deimg602.dll, Deimg603.dll, DeImgd60.dll, pscAdimg.dll, pscCllct.dll, pscCStUI.dll, pscDcd.dll, pscDevUI.dll, pscDvlp.dll, Pscl2STI.dll, pscll.dll, pscParse.dll, pscSetup.dll, psdkdll.dll, psdkReg.dll, psParse.dll. file contain material that is © Canon, Inc. 2002

Portions of the LFFPX7.DLL and LFKODAK.DLL files contain material that is ©Copyright Hewlett Packard, 1996.

Portions of the OCR/ICR/OMR Features and the help file for the OCR/ICR/OMR Features are ©Copyright Scansoft, Inc. 1995-2003. ALL RIGHTS RESERVED

Portions of the Barcode Modules contain material that is ©Copyright Axtel Inc., 1999.

Portions of the LEADTOOLS PDF Plug in and the LEADTOOLS Vector Imaging Pro are ©Copyright 1996, 2000 Artifex Software Inc. All rights reserved.

File filters for decoding MrSID ® and DjVu ® formats are provided under a license from Lizardtech, Inc.

The "FlashPix" format uses Microsoft's OLE structured storage.

Portions of the DICOM help files in Medical Imaging product line are reprinted with permission from the National Electrical Manufacturers Association ©Copyright 1998 by the National Electrical Manufacturers Association. All rights including translation into other languages, reserved under the Universal Copyright Convention, the Berne Convention or the Protection of Literacy and Artistic Works, and the International and Pan American Copyright Conventions.

Portions of LEADTOOLS Data Security Add On contain software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/), including cryptographic software written by Eric Young (eay@cryptsoft.com) and by Tim Hudson (tjh@cryptsoft.com). Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. Copyright Tim Hudson 1995-1998 (tjh@cryptsoft.com) All rights reserved.

Portions of LEADTOOLS Data Security Add On contain software based on the MD5 Message Digest Algorithm developed by RSA Data Security, Inc.. Copyright (c) 1991-92 RSA Data Security, Inc. All Rights Reserved.

Portions hereof licensed under US patent 5,327,254 and foreign counterparts.

Portions of the LEADTOOLS ICC Profiles material is © Copyright 2004, International Color Consortium.

Trademarks

LEAD® and LEADTOOLS® are registered trademarks of LEAD Technologies, Inc.
Microsoft, Windows, Windows NT, Visual Basic, Visual FoxPro, and Microsoft Access are either trademarks or registered trademarks of the Microsoft Corporation.
OS/2® is a registered trademark of International Business Machines Corporation.

TextBridge®OCR is a registered trademark of Scansoft, Inc.

ISIS® is a registered trademark of Pixel Translations, Inc.

ScanAhead™ is a trademark of Pixel Translations, Inc.

FlashPix™ is a trademark of Eastman Kodak Company.

All other brand or product names used in this online help are trademarks of their respective holders.

Address and Contact Information

LEAD Technologies, Inc.
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

(704) 332-5532
FAX: (704) 372-8161
E-mail: support@leadtools.com
Technical support: (704) 372-9681 or support@leadtools.com
Home page: http://www.leadtools.com


Programming with LEADTOOLS Toolbar

The following topics provide a systematic approach to understanding how to program with the LEADTOOLS Toolbar Class Library

Introduction to Toolbars

Initializing and Freeing Toolbars

Creating a Toolbar

Getting and Setting Toolbar Information

Getting and Setting Toolbar Characterisitcs

Getting and Setting Toolbar Button Information

Receiving Toolbar Events


Introduction to Toolbars

The LEADTOOLS Toolbar Class Library provides a means of adding either predefined or custom designed toolbars to an application. Adding toolbars to applications provides a quick and convenient way of drawing or performing other functions.

A toolbar consists of one or more tools and each tool has one or more buttons associated with it. General information about the toolbar can be accessed through an LTOOLBARINFO structure. This includes information about the number of buttons present in the toolbar, the size of the bitmaps used for the buttons and an array of tools in the toolbar.

Information about each tool in a toolbar can be accessed through an LTOOLBARTOOL structure. This structure includes information about the number of buttons associated with the tool and an array of buttons associated with the tool.

LBUTTONINFO structures contain information about each button associated with each tool in a toolbar. This information includes a button identifier, the state of the button, the bitmap displayed for the button and tool tip text that is displayed when the user places the cursor over the button.

For more information about toolbars, refer to:

Initializing and Freeing Toolbars

Creating a Toolbar

Setting Toolbar Information

Getting and Setting Toolbar Characteristics

Receiving Toolbar Events

For more information about buttons on the toolbar, refer to:

Getting and Setting Toolbar Button Information


Creating a Toolbar

After initializing the toolbar handle, the toolbar must be created using the LToolbar::Create function. The toolbar is created in a regular child window. The user has the option of creating a toolbar "from scratch" and entering the desired buttons, or the user may create a Vector or Paint toolbar, complete with a predefined set of buttons. The following example shows how to create a toolbar:

/* Global LEAD toolbar handle */
pTOOLBARHANDLE g_pLeadToolbar ;

LToolbar tlb;

L_INT ToolbarTest ( HWND hWnd )
{
/* Initiate the toolbar handle */
tlb.Initialize() ;

/* Check the validity of the handle */
if ( tlb.IsValid () )
{
POINT pt = { 0, 0 } ;

/* Initiate the point to be used to align the toolbar at the top-left of its owner client area */
ClientToScreen ( hWnd, &pt ) ;

/* Create the toolbar */
tlb.Create (hWnd, TEXT("Tools Window"), TOOLBAR_PAINT ) ;

/* Set the toolbar position */
tlb.SetPosition (&pt, TOOLBAR_POSITION_TOP | TOOLBAR_POSITION_LEFT ) ;

/* Show the toolbar */
tlb.SetVisible (TRUE ) ;
}

return SUCCESS ;
}


Getting and Setting Toolbar Button Information

A toolbar can be changed by changing the buttons that make up that toolbar. LEADTOOLS provides several functions for getting and setting information about toolbar buttons.

General information about toolbar buttons can be accessed through an LBUTTONINFO structure, including button identifier, the state of the button, the bitmap used to display the button, the tool tip text displayed when the user places the mouse over the button and user-defined information included about the button. To get the current information on a specific button, call LToolbar::GetButtonInfo. To alter the information about a specific button use the LToolbar::SetButtonInfo funtion.

Only one button can be selected or checked at a time. The selected button is the active button of the toolbar. To determine the current selected button of a toolbar, call LToolbar::GetButtonChecked. To set a different button as the selected button use LToolbar::SetButtonChecked.

In order to be selected, a toolbar button must be enabled. To determine if a specific button is enabled, call LToolbar::IsButtonEnabled. To enable or disable a button, use LToolbar::SetButtonEnabled.

Toolbar buttons may be visible or hidden. The visibility of a button may be changed using LToolbar::SetButtonVisible. To determine a button's current visibility status call LToolbar::IsButtonVisible.

In addition, buttons can be added or removed from a toolbar using LToolbar::AddButton and LToolbar::RemoveButton.


Getting and Setting Toolbar Characteristics

In addition to the toolbar information mentioned in Setting Toolbar Information, other toolbar characteristics can be modified. These include toolbar visibility, position and the number of rows present in the toolbar.

A toolbar can be made visible or hidden using LToolbar::SetVisible. To determine whether the toolbar is visible or hidden, call LToolbar::IsVisible.

The position of the toolbar can be changed using LToolbar::SetPosition. This function allows the user to specify a point and orient the toolbar around that point. To get the current position, call LToolbar::GetPosition.

The number of rows in the toolbar can also be set. This is done using the LToolbar::SetRows function. However, the number of rows cannot exceed the number of buttons in the toolbar. To determine the current number of rows in the toolbar, call LToolbar::GetRows.

A toolbar can also be changed by changing the buttons contained in the toolbar. For more information about functions that affect toolbar buttons, refer to Getting and Setting Toolbar Button Information.


Getting and Setting Toolbar Information

General information about a toolbar can be accessed through an LTOOLBARINFO structure. This includes information about the size of bitmaps used to display any associated buttons, the number of tools present on the toolbar, an array of structures that contain information about the individual tools on the toolbar and any user-defined information included in the toolbar. To get the current information about a toolbar, use the LToolbar::GetToolbarInfo. This function will update an LTOOLBARINFO structure with the current toolbar information.

The toolbar information can be changed using the LToolbar::SetToolbarInfo function. This may be used to modify an existing toolbar, or to set the information for a new toolbar created using the TOOLBAR_EMPTY flag in LToolbar::Create.

When the toolbar information is no longer needed, it should be freed by calling LToolbar::FreeToolbarInfo.

The following example shows how create a user-defined toolbar:

/* This example will create an empty toolbar and then add four buttons*/

LToolbar tlb;

L_INT ToolbarTest ( HWND hWnd )
{
/*Assume that hWnd is a valid window handle*/
/*Assume the following global declaration: */
/* LToolBar tlb;

/* Initiate the toolbar handle */
tlb.Initialize () ;

/* Check the validity of the handle */
if ( tlb.IsValid () )
{
POINT pt = { 0, 0 } ;

/* Initiate the point will be used to align the toolbar at the top-left of its owner client area */
::ClientToScreen ( hWnd, &pt ) ;

/* Create the toolbar */
tlb.Create (hWnd, TEXT("Tools Window"), TOOLBAR_EMPTY ) ;

/* assume these resource IDs contain valid bitmaps */
const L_INT nResId[ 4 ] = { IDB_BITMAP1, IDB_BITMAP2, IDB_BITMAP3, IDB_BITMAP4 };
const L_TCHAR *szToolTipText[ 4 ] = { TEXT("Button 1"), TEXT("Button 2"), TEXT("Button 3"), TEXT("Button 4") };
LBUTTONINFO ButtonInfo;

L_INT i;
L_UINT uRefId;
L_UINT32 dwFlags;

uRefId = 0; /* we don't need a reference button when adding the first one */

for( i = 0; i < 4; i++ )
{
ButtonInfo.uID = i + 1;
ButtonInfo.hBitmap = LoadBitmap(
(HINSTANCE) GetWindowLong( hWnd /*hWndParent*/, GWL_HINSTANCE ),
MAKEINTRESOURCE( nResId[ i ] )
);

lstrcpy( ButtonInfo.szToolTipText, szToolTipText[ i ] );
ButtonInfo.dwTag = 0L;
ButtonInfo.fsState = TBSTATE_ENABLED;

dwFlags = TOOLBAR_ADD_AFTER;
if( i == 0 || i == 2 )
dwFlags |= TOOLBAR_ADD_TOOL;

tlb.AddButton(uRefId, &ButtonInfo, dwFlags );

DeleteObject( ButtonInfo.hBitmap ); /* the toolbar toolkit keeps its own copy */

uRefId = ButtonInfo.uID; /* save last button ID */
}

/* Set the toolbar position */
tlb.SetPosition (&pt, TOOLBAR_POSITION_TOP | TOOLBAR_POSITION_LEFT ) ;

/* Show the toolbar */
tlb.SetVisible (TRUE ) ;
}
}


Initializing and Freeing Toolbars

LEADTOOLS accesses toolbars through the TOOLBARHANDLE structure. This structure provides a working area for the toolbar functions. The toolbar handle must be initialized before calling any of the toolbar functions. This is done using the LToolbar::Initialize function. The following example shows how to initialize the toolbar handle.

/* Global LEAD toolbar handle */
pTOOLBARHANDLE g_pLeadToolbar ;

LToolbar tlb;

L_INT ToolbarTest ( HWND hWnd )
{
/* Initiate the toolbar handle */
tlb.Initialize () ;

/* Check the validity of the handle */
if ( tlb.IsValid () )
{
POINT pt = { 0, 0 } ;

/* Initiate the point to be used to align the toolbar at the top-left of its owner client area */
ClientToScreen ( hWnd, &pt ) ;

/* Create the toolbar */
tlb.Create (hWnd, TEXT("Tools Window"), TOOLBAR_PAINT ) ;

/* Set the toolbar position */
tlb.SetPosition (&pt, TOOLBAR_POSITION_TOP | TOOLBAR_POSITION_LEFT ) ;

/* Show the toolbar */
tlb.SetVisible (TRUE ) ;
}

return SUCCESS ;
}

A toolbar handle is valid after LToolbar::Initialize has been called. However, LToolbar::Create must be called in order to call any other Toolbar functions. The validity of the toolbar should be checked before calling any other toolbar functions. This is done using LToolbar::IsValid.

When the TOOLBARHANDLE structure is no longer needed, it should be freed using the LToolbar::Free function. The following example shows how to free a toolbar handle:

LToolbar tlb;

L_INT FreeToolbar ()
{
if ( tlb.IsValid () )
{
tlb.Free ();
return SUCCESS ;
}
else
{
return FAILURE ;
}
}

Once LToolbar::Free has been called, the toolbar handle is no longer valid.


Receiving Toolbar events

When a toolbar button is selected, the application is notified through the LToolbar::ToolBarCallBack function. To receive notification of toolbar events, you must derive a class from LToolbar and override the LToolbar::ToolBarCallBack function. In addition, the use of the callback function must be enabled by calling LToolbar::EnableToolBarCallBack.


Toolbar Files To Be Included With Your Application

Files To Be Included With Your Application

The installation procedure creates a directory tree for the LEADTOOLS files, and adds the demonstration programs and online help to your desktop. You specify the root directory during installation. The following subdirectory is created:

REDIST\

Redistributable Toolbar files.

Note: | You may not copy or redistribute any of the following files without obtaining the proper license. In some cases, the license is included with your initial purchase of LEADTOOLS. In other cases, you must obtain a license from a third party or enter into a royalty agreement with LEAD to obtain the proper license. For these special licensing situations, see the notes below accompanying the specific file.
Note: | You may not distribute the header files with your application, and you may not provide software development capabilities in your application.

The following table summarizes the files you must include on your distribution diskettes to support the LEADTOOLS functions. Most files in the table are optional. 32-bit DLLs are listed. These files are referred to as "Redistributables" in the License Agreement.

Please note that LTKRN and LTWVC is required for ALL Class Library applications. For more information on LTKRN, LTWVC and other files for the Class Library, refer to Files To Be Included With Your Application .

Redistributables: | Explanation: | If you are using a standard release without Unicode, the files to use are: | If you are using a standard release with Unicode, the files to use are: | If you are using an evaluation release without Unicode, the files to use are: | If you are using an evaluation release with Unicode, the files to use are:
LTTLB | LEADTOOLS Toolbar. The header file is LTTLB.H. | DLL: LTTLB14N.DLL Library: LTTLB_N.LIB | DLL: LTTLB14NU.DLL Library: LTTLB_NU.LIB | DLL: LTTLB14E.DLL Library: LTTLB_E.LIB | DLL: LTTLB14EU.DLL Library: LTTLB_EU.LIB


Installation Directory

The installation procedure creates a directory tree for the LEADTOOLS files, and adds the demonstration programs and online help to your desktop. You specify the root directory during installation.

Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.

The following is a list of the subdirectories in the root directory:

ACROBAT | LEADTOOLS manuals in the PDF format, which you can view and print using Adobe Acrobat. These files are optional and are available when installing from the CD-ROM.
BIN | Executable files for the demonstration programs.
HELP | Online help files.
IMAGES | Sample images and databases containing images.
EXAMPLES\DLL | One subdirectory for each example API program.
EXAMPLES\OCX | One subdirectory for each example ActiveX program.
EXAMPLES\COM | One subdirectory for each example COM program.
EXAMPLES\CLASSLIB | One subdirectory for each example Class Library program.
EXAMPLES\RES | Resource files for the example programs.
INCLUDE | Header files, BAS files, and the ActiveX's MFC interface files for versions of Visual C++ earlier than 4.0.
INCLUDE\CLASSLIB | Header files for the Class Library
LIB | Library files.
REDIST | Redistributable files. These are copies of the LEADTOOLS files and other files that you may need to distribute with your application. For exact information about required files, refer to Files To Be Included With Your Application.


Classes

The following class is provided by the LEADTOOLS Toolbar Class Library:

LToolbar


LToolbar

Description

The LToolbar class is derived from the LBase class. It is used in conjunction with the Container class LContainer and the Automation class LAutomation . The LToolbar class contains the functionality for creating predefined and user defined toolbars.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

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

Class Members, Class Hierarchy Chart , Parent Class


LToolbar::Class Members

Constructors / Destructors

Creating, Initializing and Freeing Toolbar

Toolbar Buttons

Toolbar Information

Callbacks

Return to LToolbar

Constructors / Destructors

LToolbar::LToolbar()

LToolbar::~LToolbar()

Creating, Initializing and Freeing Toolbar

LToolbar::Create

LToolbar::Free

LToolbar::Initialize

Toolbar Buttons

LToolbar::AddButton

LToolbar::GetButtonInfo

LToolbar::GetButtonChecked

LToolbar::IsButtonEnabled

LToolbar::IsButtonVisible

LToolbar::SetButtonChecked

LToolbar::SetButtonEnabled

LToolbar::SetButtonVisible

LToolbar::SetButtonInfo

LToolbar::RemoveButton

Toolbar Information

LToolbar::IsValid

LToolbar::IsVisible

LToolbar::FreeToolbarInfo

LToolbar::GetPosition

LToolbar::GetRows

LToolbar::GetToolbarInfo

LToolbar::SetToolbarInfo

LToolbar::SetPosition

LToolbar::SetRows

LToolbar::SetVisible

Callbacks

LToolbar::EnableToolBarCallBack

LToolbar::ToolBarCallBack


Toolbar Class Library Function Groups

LToolbar Class Members


Technical Support

As a registered user, free technical support is available. You must register your software to receive any technical support. Technical support is available 9 a.m. through 6 p.m. Eastern Standard Time. If you are calling by phone, please be at your computer. You can also contact us through the following methods:

Phone: | (704) 372-9681
E-mail: | support@leadtools.com
FAX: | (704) 372-8161
Home page: | http://www.leadtools.com
FTP: | ftp.leadtools.com

You can also contact LEAD by mail at:

LEAD Technologies, Inc.
Attn: Technical Support
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

Before calling technical support, please look in the online documentation and the example programs for an answer to your question.


Data Types

Basic Data Types and Keywords

LEADTOOLS Basic Data Types

Keywords Used in Declarations

Toolbar Structures

LBUTTONINFO

LTOOLBARTOOL

LTOOLBARINFO

TOOLBARHANDLE

TOOLBARBUTTONID


LEADTOOLS Basic Data Types

LEADTOOLS has defined the following basic data types for portability:

Data Type | Definition and Usage
L_BITFIELD | Defined as L_UINT; used as a bit field.
L_BOOL | Defined as L_UINT; used as a boolean value.
L_CHAR | Defined as char; used as a signed 8-bit integer.
L_DOUBLE | Defined as double; used as a double precision floating point number.
L_FLOAT | Defined as float; used as a floating point number.
L_INT | Defined as int; used as a signed integer, 16-bits or larger.
L_INT16 | Defined as short; used as a signed 16-bit integer.
L_INT32 | Defined as long; used as a signed 32-bit integer.
L_UCHAR | Defined as unsigned char; used as an unsigned 8-bit integer.
L_UINT | Defined as unsigned; used as an unsigned integer, 16-bits or larger.
L_UINT16 | Defined as unsigned short; used as an unsigned 16-bit integer.
L_UINT32 | Defined as unsigned long; used as an unsigned 32-bit integer.
L_VOID | Defined as void; used as a void.
L_COMP | Defined as L_UINT; used as a handle to a computer
L_MEDIA | Defined as L_VOID L_FAR *; used as a void pointer
L_TCHAR | Defined as either char or TCHAR. If FOR_UNICODE is defined, then L_TCHAR will be defined as TCHAR.


Keywords Used in Declarations

LEADTOOLS uses the following keywords in declarations of functions, structures, and datatypes:

Keyword | Definition and Usage
L_FAR | Defined as nothing; used as a placeholder.
L_HUGE | Defined as nothing; used as a placeholder.
L_EXPORT | Defined as nothing; used as a placeholder.
L_PASCAL | Defined as nothing; used as a placeholder.
EXT_FUNCTION | Defined as WINAPI; used as an attribute for all toolkit functions.
pEXT_FUNCTION | Defined as EXT_FUNCTION L_FAR *; used as an attribute when defining pointers to toolkit functions.
EXT_CALLBACK | Defined as _cdecl L_FAR; used as an attribute for all toolkit callback functions.
pEXT_CALLBACK | Defined as EXT_CALLBACK L_FAR *; used as an attribute when defining pointers to toolkit callback functions.


LBUTTONINFO

typedef struct _LBUTTONINFO
{
L_UINT uStructSize;
L_UINT uID;
L_UCHAR fsState;
HBITMAP hBitmap;
L_TCHAR szToolTipText [ TOOLBAR_TOOLTIP_MAX_TEXT ];
L_UINT32 dwTag;

} LBUTTONINFO, L_FAR *pLBUTTONINFO;

Contains information about a button in a toolbar.

Member | Description
uStructSize | Size of this structure.
uID | Command identifier associated with the button. This identifier will be used in the user specified callback to identify the button that initiate the call.
fsState | Button state flags. This member can be a combination of the values listed below:
 | Value | Meaning
 | TBSTATE_ENABLED | The button accepts user input. A button that doesn't have this state is grayed.
 | TBSTATE_HIDDEN | The button is not visible and cannot receive user input.
 | TBSTATE_PRESSED | The button is being clicked.
hBitmap | A DDB that will represent the Hot bitmap of the button. The toolbar will automatically create the cold and the disabled bitmaps.
szToolTipText | A null terminated array of characters that will become the button tool tip. The maximum length of this string is TOOLBAR_TOOLTIP_MAX_TEXT.
dwTag | User defined data that will retrieved with the toolbar information.

Comments

The information in this structure will represent the information of a single button in the toolbar.


LTOOLBARINFO

typedef struct _LTOOLBARINFO
{
L_UINT uStructSize;
L_INT cxBitmapWidth ;
L_INT cyBitmapHeight ;
L_UINT uToolsCount ;
pLTOOLBARTOOL pTools ;
L_UINT32 dwTag ;

} LTOOLBARINFO, L_FAR *pLTOOLBARINFO ;

Contains the information that will be used to create the toolbar.

Member | Description
uStructSize | Size of this structure.
cxBitmapWidth | The width of the bitmaps that will be used in the buttons of this toolbar.
cyBitmapHeight | The Height of the bitmaps that will be used in the buttons of this toolbar.
uToolsCount | The number of the tool buttons in the toolbar.
pTools | An array of LTOOLBARTOOL structures that will be used to create this toolbar.
dwTag | User defined data associated with the toolbar information.

Comments

The uToolsCount will represent the primary buttons in the toolbar. But, every could have one or more buttons in a form of sub toolbar.


LTOOLBARTOOL

typedef struct _LTOOLBARTOOL
{
L_UINT uStructSize;
L_UINT uButtonsCount;
pLBUTTONINFO pButtons;
L_UINT32 dwTag;

} LTOOLBARTOOL, L_FAR *pLTOOLBARTOOL;

The LTOOLBARTOOL structure represents a button in the toolbar. This button could be a single button or it could be a button in a list of buttons (sub toolbar).

Member | Description
uStructSize | The size of this structure.
uButtonsCount | Number of buttons in the toolbar.
pButtons | Address of an array of LBUTTONINFO structures that contain information about the buttons to add to the toolbar.
dwTag | User defined data that will retrieved with the toolbar information.

Comments

The LTOOLBARTOOL could have one or more button that will represent a sub toolbar in the main toolbar.


TOOLBARBUTTONID

typedef enum
{
ID_TOOL_PAINT_BRUSH = 30001, // Paintbrush tool
ID_TOOL_PAINT_SHAPE_LINE = 30002, // Line shape tool
ID_TOOL_PAINT_SHAPE_RECT = 30003, // Rectangle shape
 tool
ID_TOOL_PAINT_SHAPE_ROUNDRECT = 30004, // Rounded rectangle
 shape tool
ID_TOOL_PAINT_SHAPE_ELLIPSE = 30005,  // Ellipse
 shape tool
ID_TOOL_PAINT_SHAPE_POLYGON = 30006, // Polygon shape
 tool
ID_TOOL_PAINT_SHAPE_BEZIER = 30007,  // Bezier
 shape tool
ID_TOOL_PAINT_REGION_RECT = 30008, // Region rectangle
 tool
ID_TOOL_PAINT_REGION_ROUNDRECT = 30009, // Rounded rectangle
 region tool
ID_TOOL_PAINT_REGION_ELLIPSE = 30010, // Ellipse region
 tool
ID_TOOL_PAINT_REGION_POLYGON = 30011, // Polygon region
 tool
ID_TOOL_PAINT_REGION_SURFACE = 30012, // Surface region
 tool
ID_TOOL_PAINT_REGION_BORDER = 30013, // Border region
 tool
ID_TOOL_PAINT_REGION_COLOR = 30014, // Color region
 tool
ID_TOOL_PAINT_FILL_SURFACE = 30015, // Surface fill
 tool
ID_TOOL_PAINT_FILL_BORDER = 30016, // Border fill tool
ID_TOOL_PAINT_FILL_COLORREPLACE = 30017, // Color replace
 tool
ID_TOOL_PAINT_TEXT = 30018, // Text tool
ID_TOOL_PAINT_ZOOM = 30019, // Zoom tool
ID_TOOL_PAINT_BORDERCOLORPICKER = 30020, // Border color
 picker tool
ID_TOOL_PAINT_MOVER = 30021, // Mover tool
ID_TOOL_PAINT_COUNT = 21, // Number of toolbar buttons

ID_TOOL_VECTOR_NONE = 30101, // Neutral (No tool selected)
ID_TOOL_VECTOR_SELECT = 30102, // Select object(s)
ID_TOOL_VECTOR_VERTEX = 30103, // Vertex
ID_TOOL_VECTOR_LINE = 30104, // Line
ID_TOOL_VECTOR_RECTANGLE = 30105, // Rectangle
ID_TOOL_VECTOR_POLYLINE = 30106, // Polyline
ID_TOOL_VECTOR_POLYBEZIER = 30107, // Polybezier
ID_TOOL_VECTOR_POLYGON = 30108, // Polygon
ID_TOOL_VECTOR_ELLIPSE = 30109, // Ellipse
ID_TOOL_VECTOR_CIRCLE = 30110, // Circle
ID_TOOL_VECTOR_ARC = 30111, // Arc
ID_TOOL_VECTOR_TEXT = 30112, // Text
ID_TOOL_VECTOR_PIE = 30113, // Pie
ID_TOOL_VECTOR_CHORD = 30114, // Chord
ID_TOOL_VECTOR_RASTER = 30115, // Raster
ID_TOOL_VECTOR_ROTATE = 30116, // Rotate
ID_TOOL_VECTOR_PAN = 30117, // Pan
ID_TOOL_VECTOR_COUNT = 17 // Number of toolbar buttons

} TOOLBARBUTTONID ;

Comments

The values in this enumeration will represent the IDs of all buttons for the vector and paint toolbars.


TOOLBARHANDLE

The TOOLBARHANDLE structure serves as a working area for the toolbar functions. The user could initiate the toolbar handle at the start of program and save it in a variable (lets say a global variable for example) and he could use it with any LEAD toolbar function and then (lets say at the end of the program) free it. Therefore, the user doesn’t have to initialize the toolbar handle and free it every time he wants to do some toolbar action.


Return Codes

For a list of all possible error codes for LEADTOOLS Toolbar Class Library, refer to LEADTOOLS Class Library Error Codes in the Main Class Library help file.


LToolbar::LToolbar

#include "ltwrappr.h"

L_VOID LToolbar::LToolbar(void)

Constructs and initializes the member variables of the LToolbar object.

Returns

None

Required DLLs and Libraries

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:

LToolbar::~LToolbar, Class Members

Example

For an example, refer to LToolbar::Free.


LToolbar::~LToolbar

#include "ltwrappr.h"

virtual L_VOID LToolbar::~LToolbar(void)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LToolbar class.

Required DLLs and Libraries

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:

LToolbar::LToolbar, Class Members

Example

For an example, refer to LToolbar::Free.


LToolbar::AddButton

#include "ltwrappr.h"

L_INT LToolbar::AddButton(uButtonRefId, pButtonInfo, dwFlags )

L_UINT uButtonRefId; | /* button ID */
const pLBUTTONINFO pButtonInfo; | /* pointer to a structure */
L_UINT32 dwFlags; | /* flags */

Adds a new button to the toolbar.

Parameter | Description
uButtonRefId | Reference to use for positioning the new button inside the toolbar.
pButtonInfo | Point to an LBUTTONINFO structure containing data for the new button.
dwFlags | Flag that indicates where to add the new button, with respect to the button specified in uButtonRefId. Possible values are:
 | Flag | Meaning
 | TOOLBAR_ADD_BEFORE | Add this button before the button specified by uButtonRefId in the toolbar.
 | TOOLBAR_ADD_AFTER | Add this button after the button specified by uButtonRefId in the toolbar.
 | TOOLBAR_ADD_TOOL | If this flag is specified, the toolkit will create a new tool and make this button the first button of the new tool.
 | If this flag is not specified, the toolkit will add the new button to the same tool as uButtonRefId.
 | Note, if the toolbar contains no buttons, both uButtonRefId and dwFlags will be ignored and the new tool and button will be added to the toolbar.

Comments

As an example, if dwFlags is set to TOOLBAR_ADD_BEFORE | TOOLBAR_ADD_TOOL, then a new tool will be added before the button specified by uButtonRefId. If dwFlags is set to TOOLBAR_ADD_BEFORE, then the new button will be added before the button specified by uButtonRefId and it will become part of the same tool as the button specified by uButtonRefId.

Returns

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

Required DLLs and Libraries

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: | LToolbar::RemoveButton, LToolbar::GetButtonInfo, LToolbar::SetButtonInfo, LToolbar::GetToolbarInfo, LToolbar::SetToolbarInfo, Class Members
Topics: | Getting and Setting Toolbar Button Information

Example

/* This example will create an empty toolbar and then add four buttons*/

LToolbar tlb;

L_VOID ToolbarTest ( HWND hWnd )
{
/*Assume that m_hWnd is a valid window handle*/
/*Assume the following global declaration: */
LToolbar tlb;

/* Initiate the toolbar handle */
tlb.Initialize ();

/* Check the validity of the handle */
if ( tlb.IsValid () )
{
POINT pt = { 0, 0 } ;

/* Initiate the point will be used to align the toolbar at the top-left of its owner client area */
::ClientToScreen ( hWnd, &pt ) ;

/* Create the toolbar */
tlb.Create (hWnd, TEXT("Tools Window"), TOOLBAR_EMPTY ) ;

/* assume these resource IDs contain valid bitmaps */
const L_INT nResId[ 4 ] = { IDB_BITMAP1, IDB_BITMAP2, IDB_BITMAP3, IDB_BITMAP4 };
const L_TCHAR *szToolTipText[ 4 ] = { TEXT("Button 1"), TEXT("Button 2"), TEXT("Button 3"), TEXT("Button 4") };
LBUTTONINFO ButtonInfo;

L_INT i;
L_UINT uRefId;
L_UINT32 dwFlags;

uRefId = 0; /* we dont need a reference button when adding the first one */

for( i = 0; i < 4; i++ )
{
ButtonInfo.uID = i + 1;
ButtonInfo.hBitmap = LoadBitmap(
(HINSTANCE) GetWindowLong( hWnd /*hWndParent*/, GWL_HINSTANCE ),
MAKEINTRESOURCE( nResId[ i ] )
);

lstrcpy( ButtonInfo.szToolTipText, szToolTipText[ i ] );
ButtonInfo.dwTag = 0L;
ButtonInfo.fsState = TBSTATE_ENABLED;

dwFlags = TOOLBAR_ADD_AFTER;
if( i == 0 || i == 2 )
dwFlags |= TOOLBAR_ADD_TOOL;

tlb.AddButton (uRefId, &ButtonInfo, dwFlags );

DeleteObject( ButtonInfo.hBitmap ); /* the toolbar toolkit keeps its own copy */

uRefId = ButtonInfo.uID; /* save last button ID */
}

/* Set the toolbar position */
tlb.SetPosition (&pt, TOOLBAR_POSITION_TOP | TOOLBAR_POSITION_LEFT ) ;

/* Show the toolbar */
tlb.SetVisible (TRUE ) ;
}
}


LToolbar::Create

#include "ltwrappr.h"

L_INT LToolbar::Create (hwndParent, szTitle, dwFlags)

HWND hwndParent; | /* window handle */
LPCSTR szTitle; | /* window title string */
L_UINT32 dwFlags; | /* flag that indicates the toolbar type */

Creates a toolbar.

Parameter | Description
hwndParent | Window handle to the toolbar's parent window.
szTitle | Pointer to a null-terminated string to be used as the title for the toolbar window.
dwFlags | Flags that will indicate the type of the toolbar to be created. Possible values are:
 | Value | Meaning
 | TOOLBAR_PAINT | Creates a DigitalPaint toolkit toolbar.
 | TOOLBAR_VECTOR | Creates a vector toolkit toolbar.
 | TOOLBAR_EMPTY | Creates an empty toolbar.

Returns

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

Comments

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

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

Note:

The Vector and DigitalPaint toolbars are Automation toolbars. When using the Automation Class Library in addition to the Toolbar Class Library, these toolbars automatically handle the buttons and the necessary function calls. If automation is not used, then it is the user's responsibility to create buttons, assign ID numbers, process the events and handle all necessary function calls.

The DigitalPaint toolbar contains the following buttons:

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

The vector toolbar contains the following buttons:

Neutral (No tool selected) | ID_TOOL_VECTOR_NONE
Select object(s) | ID_TOOL_VECTOR_SELECT
Vertex | ID_TOOL_VECTOR_VERTEX
Line | ID_TOOL_VECTOR_LINE
Rectangle | ID_TOOL_VECTOR_RECTANGLE
Polyline | ID_TOOL_VECTOR_POLYLINE
Polybezier | ID_TOOL_VECTOR_POLYBEZIER
Polygon | ID_TOOL_VECTOR_POLYGON
Ellipse | ID_TOOL_VECTOR_ELLIPSE
Circle | ID_TOOL_VECTOR_CIRCLE
Arc | ID_TOOL_VECTOR_ARC
Text | ID_TOOL_VECTOR_TEXT
Pie | ID_TOOL_VECTOR_PIE
Chord | ID_TOOL_VECTOR_CHORD
Raster | ID_TOOL_VECTOR_RASTER
Rotate | ID_TOOL_VECTOR_ROTATE
Pan | ID_TOOL_VECTOR_PAN

Required DLLs and Libraries

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: | LToolbar::Initialize, LToolbar::Free, LToolbar::IsValid, Class Members
Topics: | Creating a Toolbar

Example

/* This example will initiate, create a toolbar, set its position and make it visible */

/* Global LEAD toolbar handle */
pTOOLBARHANDLE g_pLeadToolbar ;

LToolbar tlb;

L_INT ToolbarTest ( HWND hWnd )
{
/* Initiate the toolbar handle */
tlb.Initialize () ;

/* Check the validity of the handle */
if ( tlb.IsValid () )
{
POINT pt = { 0, 0 } ;

/* Initiate the point to be used to align the toolbar at the top-left of its owner client area */
::ClientToScreen ( hWnd, &pt ) ;

/* Create the toolbar */
tlb.Create (hWnd, TEXT("Tools Window"), TOOLBAR_PAINT ) ;

/* Set the toolbar position */
tlb.SetPosition (&pt, TOOLBAR_POSITION_TOP | TOOLBAR_POSITION_LEFT ) ;

/* Show the toolbar */
tlb.SetVisible (TRUE ) ;
}

return SUCCESS ;
}


LToolbar::EnableToolBarCallBack

#include "ltwrappr.h"

L_BOOL LToolbar::EnableToolBarCallBack (bEnable)

L_BOOL bEnable;

/* flag*/

Enables or disables the Toolbar callback function to be used by the user. Returns the last enable state.

Parameter | Description
bEnable | TRUE value enables the toolbar callback function. FALSE value disables the toolbar callback function.

Returns

TRUE | The callback function was previously enabled.
FALSE | The callback function was previously disabled.

Comments

The LToolbar::ToolBarCallBack function is called for each event that occurs in the toolbar.

To receive notification of toolbar events, you must derive a class from LToolbar and override the LToolbar::ToolBarCallBack function. In addition, the use of the callback function must be enabled by calling LToolbar::EnableToolBarCallBack.

Required DLLs and Libraries

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: | LToolbar::ToolBarCallBack, Class Members
Topics: | Receiving Toolbar Events

Example

For an example, refer to LToolbar::ToolBarCallBack.


LToolbar::Free

#include "ltwrappr.h"

L_INT LToolbar::Free (void)

Frees the toolbar handle internal information.

Returns

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

Comments

When the toolbar handle is no longer needed, this function should be called to free it.

Required DLLs and Libraries

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: | LToolbar::Initialize, Class Members
Topics: | Initializing and Freeing Toolbars

Example

LToolbar tlb;

L_INT FreeToolbar ()
{
if ( tlb.IsValid () )
{
tlb.Free () ;
return SUCCESS ;
}
else
{
return FAILURE ;
}
}


LToolbar::FreeToolbarInfo

#include "ltwrappr.h"

L_INT LToolbar::FreeToolbarInfo(pToolbarInfo)

pLTOOLBARINFO pToolbarInfo;

/* pointer to structure */

Frees the toolbar information allocated by calling LToolbar::GetToolbarInfo.

Parameter | Description
pToolbarInfo | Pointer to a LTOOLBARINFO structure that contains the toolbar information to be freed.

Returns

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

Comments

The structure pToolbarInfo fields contents should were be allocated by using LToolbar::GetToolbarInfo.

Required DLLs and Libraries

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: | LToolbar::GetToolbarInfo, LToolbar::SetToolbarInfo, Class Members
Topics: | Getting and Setting Toolbar Information

Example

For an example, refer to LToolbar::GetToolbarInfo.


LToolbar::GetButtonChecked

#include "ltwrappr.h"

L_INT LToolbar::GetButtonChecked(void)

Gets the current checked ( pressed ) button in the toolbar.

Returns

An integer that will receive the current checked ( pressed ) button identifier.

Comments

To set the selected button in the toolbar, call LToolbar::SetButtonChecked.

Required DLLs and Libraries

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: | LToolbar::SetButtonChecked, Class Members
Topics: | Getting and Setting Toolbar Button Information

Example

For short example refer to LToolbar::SetButtonChecked.


LToolbar::GetButtonInfo

#include "ltwrappr.h"

L_INT LToolbar::GetButtonInfo (uButtonId, pButtonInfo, uStructSize)

L_UINT uButtonId; | /* button Id */
pLBUTTONINFO pButtonInfo; | /* pointer to a structure */
L_UINT uStructSize; | /* size in bytes, of the structure pointed to by pButtonInfo */

Gets the information for the specified toolbar button.

Parameter | Description
uButtonId | Identifier that indicates the button for which to get the information.
pButtonInfo | Pointer to an LBUTTONINFO structure to be updated with the button information.
uStructSize | Size in bytes, of the structure pointed to by pButtonInfo. Use sizeof(LBUTTONINFO).

Returns

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

Comments

To change the information on the specified toolbar button, call this function to get the current information. Change the information in pButtonInfo and then call LToolbar::SetButtonInfo.

Required DLLs and Libraries

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: | LToolbar::AddButton, LToolbar::RemoveButton, LToolbar::SetButtonInfo, LToolbar::GetToolbarInfo, LToolbar::SetToolbarInfo, Class Members
Topics: | Getting and Setting Toolbar Button Information

Example

/* This example will display the tool tip text of each button in a toolbar */

LToolbar tlb;

L_VOID ToolbarTest ( HWND hWnd )
{
LTOOLBARINFO ToolbarInfo;
LBUTTONINFO ButtonInfo;
L_UINT i, j;

/* get toolbar info */
ToolbarInfo.uStructSize = sizeof( LTOOLBARINFO );
tlb.GetToolbarInfo(&ToolbarInfo, sizeof(LTOOLBARINFO) );

/* iterate through tools */
for( i = 0; i < ToolbarInfo.uToolsCount; i++ )
{
/* get the text */
for( j = 0; j < ToolbarInfo.pTools[ i ].uButtonsCount; j++ )
{
ButtonInfo.uStructSize = sizeof( LBUTTONINFO );
tlb.GetButtonInfo (ToolbarInfo.pTools[ i ].pButtons[ j ].uID, &ButtonInfo, sizeof(LBUTTONINFO));
::MessageBox(NULL, ButtonInfo.szToolTipText, TEXT(""), MB_OK);
}
}

/* free the info structure */
tlb.FreeToolbarInfo (&ToolbarInfo);
}


LToolbar::GetPosition

#include "ltwrappr.h"

POINT LToolbar::GetPosition (dwFlags)

L_UINT32 dwFlags;

/* position flags */

Gets the toolbar's current position.

Parameter | Description
dwFlags | Set of flags that will specify how the lpptPos argument will be set. One of the following values:
 | Horizontal alignment flags:
 | Value | Meaning
 | TOOLBAR_POSITION_LEFT | The specified point x will become the left of the toolbar window.
 | TOOLBAR_POSITION_RIGHT | The specified point x will become the right of the toolbar window.
 | Vertical alignment flags: |
 | Value | Meaning
 | TOOLBAR_POSITION_TOP | The specified point y will become the top of the toolbar window.
 | TOOLBAR_POSITION_BOTTOM | The specified point y will become the bottom of the toolbar window.
 | The values from each category are combined by using the bitwise OR operator ( | ).

Returns

A POINT structure that contains the current position.

Comments

To set the position of the toolbar, call LToolbar::SetPosition.

Required DLLs and Libraries

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: | LToolbar::SetPosition, Class Members
Topics: | Getting and Setting Toolbar Characteristics

Example

L_INT GetToolbarWidth ( LToolbar &Toolbar )
{
// check the validity of the toolbar handle
if (Toolbar.IsValid () )
{
POINT ptPos00, ptPos01 ;

// get the toolbar position
ptPos00 = Toolbar.GetPosition (TOOLBAR_POSITION_LEFT | TOOLBAR_POSITION_TOP ) ;
ptPos01 = Toolbar.GetPosition (TOOLBAR_POSITION_RIGHT | TOOLBAR_POSITION_TOP ) ;

return ( ptPos01.x - ptPos00.x ) ;
}
else
{
return -1 ;
}
}


LToolbar::GetRows

#include "ltwrappr.h"

L_INT LToolbar::GetRows (void)

Gets the current number of rows in the toolbar.

Returns

Number of rows.

Comments

To set the number of rows in a toolbar, call LToolbar::SetRows.

Required DLLs and Libraries

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: | LToolbar::GetRows, Class Members
Topics: | Getting and Setting Toolbar Characteristics

Example

For an example, refer to LToolbar::SetRows.


LToolbar::GetToolbarInfo

#include "ltwrappr.h"

L_INT LToolbar::GetToolbarInfo (pToolbarInfo, uStructSize)

pLTOOLBARINFO pToolbarInfo; | /* pointer to a structure */
L_UINT uStructSize; | /* size in bytes, of the structure pointed to by pToolbarInfo */

Gets the toolbar current information and copy it to the pToolbarInfo argument.

Parameter | Description
pToolbarInfo | Pointer to an LTOOLBARINFO structure to be updated with the current toolbar information.
uStructSize | Size in bytes, of the structure pointed to by pToolbarInfo. Use sizeof(LTOOLBARINFO).

Returns

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

Comments

LTOOLBARINFO structure fields contents should be freed by using the LToolbar::FreeToolbarInfo.

Required DLLs and Libraries

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: | LToolbar::SetToolbarInfo, LToolbar::FreeToolbarInfo, Class Members
Topics: | Getting and Setting Toolbar Information

Example

/* This example will create a DigitalPaint toolbar and then gets its information,
then changes its button IDs and it will set this information as the new information
for the toolbar */

LToolbar tlb;

L_INT ToolbarTest ( HWND hWnd )
{
LTOOLBARINFO ToolbarInfo ;

/* Initiate the toolbar handle */
tlb.Initialize () ;

if ( tlb.IsValid () ) /* check the validity of the toolbar handle */
{
POINT pt = { 0, 0 } ;

/* Create the toolbar */
tlb.Create (hWnd, TEXT("Tools Window"), TOOLBAR_PAINT ) ;

/* Get the toolbar information */
tlb.GetToolbarInfo (&ToolbarInfo , sizeof(LTOOLBARINFO)) ;

/* Change all buttons IDs */
for ( L_UINT i = 0; i < ToolbarInfo.uToolsCount; i ++ )
{
for ( L_UINT j; j < ToolbarInfo.pTools[i].uButtonsCount; j ++ )
{
ToolbarInfo.pTools[i].pButtons[j].uID ++ ;
}
}

/* Get the point that will be used to align the toolbar to
top-left of its owner client area */
::ClientToScreen ( hWnd, &pt ) ;

/* Set the toolbar position */
tlb.SetPosition (&pt, TOOLBAR_POSITION_TOP | TOOLBAR_POSITION_LEFT ) ;

/* Set the new toolbar information */
tlb.SetToolbarInfo (&ToolbarInfo ) ;

/* Free the information that was allocated by L_TBGetToolbarInfo */
tlb.FreeToolbarInfo (&ToolbarInfo ) ;

/* Show the toolbar */
tlb.SetVisible (TRUE ) ;

return SUCCESS ;
}
else
{
return FAILURE ;
}
}


LToolbar::Initialize

#include "ltwrappr.h"

L_INT LToolbar::Initialize (void)

Initializes the toolbar handle.

Returns

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

Comments

This function must be called before calling any other toolbar functions.

A toolbar handle will be valid after this function is called. However, LToolbar::Create must be called in order to call any other Toolbar functions.

Required DLLs and Libraries

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: | LToolbar::Free, Class Members
Topics: | Initializing and Freeing Toolbars

Example

For an example, refer to LToolbar::Create.


LToolbar::IsButtonEnabled

#include "ltwrappr.h"

L_INT LToolbar::IsButtonEnabled (uButtonID)

L_UINT uButtonID;

/* button ID */

Determines whether the specified button is enabled for mouse input.

Parameter | Description
uButtonID | Identifier of the button for which to retrieve the status.

Returns

TRUE | Enabled.
FALSE | Disabled.

Comments

To change the enabled status of a button, call LToolbar::SetButtonEnabled.

Required DLLs and Libraries

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: | LToolbar::SetButtonEnabled, Class Members
Topics: | Getting and Setting Toolbar Button Information

Example

For an example, refer to LToolbar::SetButtonEnabled.


LToolbar::IsButtonVisible

#include "ltwrappr.h"

L_BOOL LToolbar::IsButtonVisible (uButtonID)

L_UINT uButtonID;

/* button ID */

Determines whether the specified button is visible.

Parameter | Description
uButtonID | Identifier of the button for which to retrieve the visibility status.

Returns

TRUE | Visible.
FALSE | Not visible.

Comments

To change the visibility status of a button, call LToolbar::SetButtonVisible.

Required DLLs and Libraries

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: | LToolbar::SetButtonVisible, Class Members
Topics: | Getting and Setting Toolbar Button Information

Example

For an example, refer to LToolbar::SetButtonVisible.


LToolbar::IsValid

#include "ltwrappr.h"

L_BOOL LToolbar::IsValid (void)

Checks the validity of the given toolbar handle.

Returns

TRUE | The toolbar handle is valid.
FALSE | An error occurred. Refer to Return Codes.

Comments

The toolbar handle will be valid after calling LToolbar::Initialize. However, LToolbar::Create must be called before calling any other Toolbar functions.

Required DLLs and Libraries

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: | LToolbar::Initialize, LToolbar::Create, LToolbar::Free, Class Members
Topics: | Initializing and Freeing Toolbars

Example

For an example, refer to LToolbar::Create.


LToolbar::IsVisible

#include "ltwrappr.h"

L_BOOL LToolbar::IsVisible(void)

Queries the visibility of the toolbar window.

Returns

TRUE | Visible.
FALSE | Not visible.

Comments

To change the visibility status of the toolbar, call LToolbar::SetVisible.

Required DLLs and Libraries

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: | LToolbar::SetVisible, Class Members
Topics: | Getting and Setting Toolbar Characteristics

Example

/* This function will toggle the toolbar visibility state */

LToolbar tlb;

L_INT ToggleToolbar ()
{
if ( tlb.IsValid () ) /* check the validity of the toolbar handle */
{

/* Get the visibility state of the toolbar */

if (tlb.IsVisible () )
{
/* Hid the toolbar */
tlb.SetVisible (FALSE ) ;
}
else
{
/* Show the toolbar */
tlb.SetVisible (TRUE ) ;
}

return SUCCESS ;
}
else
{
return FAILURE ;
}
}


LToolbar::RemoveButton

#include "ltwrappr.h"

L_INT LToolbar::RemoveButton(uButtonId)

L_UINT uButtonId;

/* button Id */

Removes a button from the toolbar.

Parameter | Description
uButtonId | Button identifier that indicates the button to be removed. Note if this button is the only remaining button in its tool, the whole tool is removed too.

Returns

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

Comments

To add a button to a toolbar, call LToolbar::AddButton.

Required DLLs and Libraries

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: | LToolbar::AddButton, LToolbar::GetButtonInfo, LToolbar::SetButtonInfo, LToolbar::GetToolbarInfo, LToolbar::SetToolbarInfo, Class Members
Topics: | Getting and Setting Toolbar Button Information

Example

/* This example will remove all the buttons from a toolbar*/

LToolbar tlb;

L_VOID ToolbarTest ( HWND hWnd )
{
LTOOLBARINFO ToolbarInfo;
L_UINT i, j;

/* get toolbar info */
ToolbarInfo.uStructSize = sizeof( LTOOLBARINFO );
tlb.GetToolbarInfo (&ToolbarInfo , sizeof(LTOOLBARINFO) );

/* iterate through tools */
for( i = 0; i < ToolbarInfo.uToolsCount; i++ )
{
/* remove all buttons of this tool */
for( j = 0; j < ToolbarInfo.pTools[ i ].uButtonsCount; j++ )
tlb.RemoveButton (ToolbarInfo.pTools[ i ].pButtons[ j ].uID);
}

/* free the info structure */
tlb.FreeToolbarInfo (&ToolbarInfo);
}


LToolbar::SetButtonChecked

#include "ltwrappr.h"

L_INT LToolbar::SetButtonChecked (uButtonID )

L_UINT uButtonID;

/* button ID */

Checks (press) the given button in the toolbar.

Parameter | Description
uButtonID | Identifier of the button to check ( to press ).

Returns

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

Comments

The toolbar has only one checked (pressed) button at a time.

Required DLLs and Libraries

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: | LToolbar::GetButtonChecked, Class Members
Topics: | Getting and Setting Toolbar Button Information

Example

/* This example will check the current check button in the toolbar
and then if the checked button is not equal the required button, the required button will be checked */

LToolbar tlb;

L_INT CheckButtonTest (L_UINT uButtonID )
{
if ( tlb.IsValid () ) /* check the validity of the toolbar handle */
{
L_INT nCheckedID ;

/* Get the current checked button in the toolbar */
nCheckedID = tlb.GetButtonChecked () ;

if ( nCheckedID != ( L_INT ) uButtonID )
{
/* Check the required button */
tlb.SetButtonChecked (uButtonID ) ;
}

return SUCCESS ;
}
else
{
return FAILURE ;
}
}


LToolbar::SetButtonEnabled

#include "ltwrappr.h"

L_INT LToolbar::SetButtonEnabled (uButtonID, bEnable)

L_UINT uButtonID; | /* button ID */
L_BOOL bEnable; | /* flag */

Enables or disables the specified button in the toolbar.

Parameter | Description
uButtonID | Identifier of the button to enable or disable.
bEnable | Flag that indicates whether to enable or disable the specified button. Possible values are:
 | Value | Meaning
 | TRUE | Enable the specified button.
 | FALSE | Disable the specified button.

Returns

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

Comments

To determine whether a button is enabled or disabled, call LToolbar::IsButtonEnabled.

Required DLLs and Libraries

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: | LToolbar::IsButtonEnabled, Class Members
Topics: | Getting and Setting Toolbar Button Information

Example

LToolbar tlb;

L_INT ToggleToolbarButton (L_UINT uButtonID )
{
if ( tlb.IsValid () ) /* check the validity of the toolbar handle */
{
L_BOOL bEnabled ;

/* Get the state of the toolbar button */
bEnabled = tlb.IsButtonEnabled (uButtonID) ;

if ( bEnabled )
{
/* Disable the button */
tlb.SetButtonEnabled (uButtonID, FALSE ) ;
}
else
{
/* Enable the button */
tlb.SetButtonEnabled (uButtonID, TRUE ) ;
}

return SUCCESS ;
}
else
{
return FAILURE ;
}
}


LToolbar::SetButtonInfo

#include "ltwrappr.h"

L_INT LToolbar::SetButtonInfo (uButtonId, pButtonInfo )

L_UINT uButtonId; | /* button Id */
const pLBUTTONINFO pButtonInfo; | /* pointer to a structure */

Sets the information for the specified toolbar button.

Parameter | Description
uButtonId | Identifier that indicates the button for which to set the specified information.
pButtonInfo | Pointer to an LBUTTONINFO structure that contains the button information to set.

Returns

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

Comments

To get the current information for a toolbar button call LToolbar::GetButtonInfo.

Required DLLs and Libraries

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: | LToolbar::AddButton, LToolbar::RemoveButton, LToolbar::GetButtonInfo, LToolbar::GetToolbarInfo, LToolbar::SetToolbarInfo, Class Members
Topics: | Getting and Setting Toolbar Button Information

Example

/*This example will change the tool tip text of each button in a toolbar*/
LToolbar tlb;

L_VOID ToolbarTest ( HWND hWnd )
{
LTOOLBARINFO ToolbarInfo;
LBUTTONINFO ButtonInfo;
L_UINT i, j;

/* get toolbar info */
ToolbarInfo.uStructSize = sizeof( LTOOLBARINFO );
tlb.GetToolbarInfo (&ToolbarInfo, sizeof(LTOOLBARINFO) );

/* iterate through tools */
for( i = 0; i < ToolbarInfo.uToolsCount; i++ )
{
/* change the text */
for( j = 0; j < ToolbarInfo.pTools[ i ].uButtonsCount; j++ )
{
tlb.GetButtonInfo (ToolbarInfo.pTools[ i ].pButtons[ j ].uID, &ButtonInfo, sizeof(LBUTTONINFO));
wsprintf(ButtonInfo.szToolTipText, TEXT("Tool[%d] Button[%d]"), i, j);
tlb.SetButtonInfo (ToolbarInfo.pTools[ i ].pButtons[ j ].uID, &ButtonInfo);
}
}

/* free the info structure */
tlb.FreeToolbarInfo (&ToolbarInfo);
}


LToolbar::SetButtonVisible

#include "ltwrappr.h"

L_INT LToolbar::SetButtonVisible (uButtonID, bVisible )

L_UINT uButtonID; | /* button ID */
L_BOOL bVisible; | /* visibility flag */

Sets the visibility state of the specified button in a toolbar.

Parameter | Description
uButtonID | Identifier of the button to set its visibility.
bVisible | Flag that indicates whether to make the specified button visible or invisible. Possible values are:
 | Value | Meaning
 | TRUE | Make the specified button visible.
 | FALSE | Make the specified button hidden.

Returns

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

Comments

To determine whether a button is visible or hidden, call LToolbar::IsButtonVisible.

Required DLLs and Libraries

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: | LToolbar::IsButtonVisible, Class Members
Topics: | Getting and Setting Toolbar Button Information

Example

LToolbar tlb;

L_INT ToggleToolbarButton (L_UINT uButtonID )
{
if ( tlb.IsValid () ) /* check the validity of the toolbar handle */
{
L_BOOL fVisible ;

/* Get the state of the toolbar button visibility */
fVisible = tlb.IsButtonVisible (uButtonID) ;

if ( fVisible )
{
/* Hid the button */
tlb.SetButtonVisible (uButtonID, FALSE ) ;
}
else
{
/* Show the button */
tlb.SetButtonVisible (uButtonID, TRUE ) ;
}

return SUCCESS ;
}
else
{
return FAILURE ;
}
}


LToolbar::SetPosition

#include "ltwrappr.h"

L_INT LToolbar::SetPosition (lpptPos, dwFlags )

LPPOINT lpptPos; | /* pointer to a structure */
L_UINT32 dwFlags; | /* position flags */

Sets the toolbar window position.

Parameter | Description
lpptPos | Pointer to a POINT structure that contains values used to align the toolbar. The coordinates are with respect to the screen.
dwFlags | Set of flags that will indicate how the toolbar will be aligned. Possible values are:
 | One of the following values:
 | Horizontal alignment flags:
 | Value | Meaning
 | TOOLBAR_POSITION_LEFT | The specified point x will become the left of the toolbar window.
 | TOOLBAR_POSITION_RIGHT | The specified point x will become the right of the toolbar window.
 | Vertical alignment flags:
 | Value | Meaning
 | TOOLBAR_POSITION_TOP | The specified point y will become the top of the toolbar window.
 | TOOLBAR_POSITION_BOTTOM | The specified point y will become the bottom of the toolbar window.
 | The values from each category are combined by using the bitwise OR operator (|).

Returns

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

Comments

To get the current toolbar position and alignment, call LToolbar::GetPosition.

Required DLLs and Libraries

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: | LToolbar::GetPosition, Class Members
Topics: | Getting and Setting Toolbar Characteristics

Example

For an example, refer to LToolbar::Create.


LToolbar::SetRows

#include "ltwrappr.h"

L_INT LToolbar::SetRows (nRows)

L_INT nRows;

/* number of rows */

Sets the number of rows of buttons in the toolbar.

Parameter | Description
nRows | Number of rows requested. The minimum number of rows is one, and the maximum number of rows is equal to the number of buttons in the toolbar.

Returns

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

Comments

Buttons are arranged on the rows from left to right.

To determine the current number of rows set, call LToolbar::GetRows.

Required DLLs and Libraries

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: | LToolbar::GetRows, Class Members
Topics: | Getting and Setting Toolbar Characteristics

Example

/* This example gets the current number of rows in the toolbar. If it is not 2, then it will make 2 rows. */

LToolbar tlb;

L_INT SetToolbarRows ()
{
if ( tlb.IsValid () ) /* check the validity of the toolbar handle */
{
L_INT nRow ;

/* Get the number of rows in the toolbar */
nRow =tlb.GetRows () ;

if ( nRow != 2 )
{
/* Set the number of rows to 2 */
tlb.SetRows (2 ) ;
}

return SUCCESS ;
}
else
{
return FAILURE ;
}
}


LToolbar::SetToolbarInfo

#include "ltwrappr.h"

L_INT LToolbar::SetToolbarInfo (pToolbarInfo )

pLTOOLBARINFO pToolbarInfo;

/* pointer to a structure */

Sets the toolbar information.

Parameter | Description
pToolbarInfo | Pointer to an LTOOLBARINFO structure that contains the information that will be used to set the toolbar information.

Returns

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

Comments

This function could be used to assign information to a toolbar created using the TOOLBAR_EMPTY flag in the LToolbar::Create function, or it could be used to adjust the toolbar that is already created.

Required DLLs and Libraries

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: | LToolbar::GetToolbarInfo, LToolbar::FreeToolbarInfo, Class Members
Topics: | Getting and Setting Toolbar Information

Example

For an example, refer to LToolbar::GetToolbarInfo.


LToolbar::SetVisible

#include "ltwrappr.h"

L_INT LToolbar::SetVisible(bVisible)

L_BOOL bVisible;

/* visibility flag */

Sets the toolbar window visibility.

Parameter | Description
bVisible | Flag that indicates whether to show or hide the toolbar. Possible values are:
 | Value | Meaning
 | TRUE | Show the toolbar.
 | FALSE | Hide the toolbar.

Returns

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

Comments

To determine the current toolbar visibility status, call LToolbar::IsVisible.

Required DLLs and Libraries

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: | LToolbar::IsVisible, Class Members
Topics: | Getting and Setting Toolbar Characteristics

Example

For an example, refer to LToolbar::Create.


LToolbar::ToolBarCallBack

#include "ltwrappr.h"

virtual L_INT LToolbar::ToolBarCallBack (nButtonID, dwData)

TOOLBARBUTTONID nButtonID; | /* button ID */
L_UINT32 dwData; | /* reserved */

User can override LToolbar::ToolBarCallBack function and process certain events.

Parameter | Description
nButtonID | The button that was responsible for creating this toolbar events.
dwData | User defined data that will retrieved with the toolbar information.

Returns

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

Comments

This function is called for each event that occurs in the toolbar.

To receive notification of toolbar events, you must derive a class from LToolbar and override this function. In addition, the use of the callback function must be enabled by calling LToolbar::EnableToolBarCallBack.

Required DLLs and Libraries

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: | LToolbar::EnableToolBarCallBack, Class Members
Topics: | Receiving Toolbar Events

Example

class LUserToolbar:public LToolbar
{
protected :
virtual L_INT ToolBarCallBack(L_UINT nButton, L_UINT32 dwData);

};

LUserToolbar::ToolBarCallBack(L_UINT nButton, L_UINT32 dwData)
{
//do your work;
return 0;
}
// the user should call LToolbar::EnableToolBarCallBack()
LUserToolbar userToolbar;
UserToolbar.EnableToolBarCallBack (TRUE);


Raster Pro/Document/Medical Features

Raster Pro:

LEADTOOLS Raster Imaging Pro provides some imaging capabilities that are not available in the LEADTOOLS Raster Imaging product. In order to access these features, you must unlock them by calling LSettings::UnlockSupport (L_SUPPORT_LTPRO, L_KEY_LTPRO). L_KEY_LTPRO can be found in ltkey.h.

If you are a licensed user of LEADTOOLS Raster Imaging, and would like to access Raster Imaging Pro features, you must contact Tech Support for information on obtaining a license and the unlock key for calling LSettings::UnlockSupport.

Document/Medical:

LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite are the most comprehensive imaging toolkits on the market. No other toolkit provides as many imaging features for color, gray-scale and black & white images in one development package, and for one price. These toolkits comprise LEAD's best code and are designed for the programmer who is looking for the fastest performance, and/or the most extensive color, document, and medical imaging capabilities available.

These toolkits contain powerful annotation capabilities and optimized document image processing filters, and high performance compression, decompression and viewing of JPEG, LEAD CMP, MRC and CCITT G3/G4. The annotation capabilities enable the programmer to add text, highlights, sticky notes, audio, ellipses, buttons, lines, arrows, rectangles, polygons, redaction (blackout), hotspots, freehand scribble, pointers, bitmap and text stamps, to black & white and color images. Programmers working with document imaging will also find special processing filters such as despeckle, deskew, favor black, and scale to gray to enhance their black and white 1 bit images. Additionally, you can achieve faster rotation in 90-degree increments by applying a rotated view perspective to the bitmap. These LEADTOOLS toolkits offer the fastest software-only JPEG decoder available.

LEADTOOLS Document Imaging

The LEADTOOLS Document Imaging toolkit contains all the features available in the LEADTOOLS Raster Imaging Pro. In addition, it contains the following capabilities:

Special functions for Document (bitonal) images. The LEADTOOLS functions for bitonal images are especially useful for working with images from black-and-white scanners or FAX machines. These functions let you do things such as automatically straighten (deskew) an image, remove spots (despeckle), or clarify a scaled display (using scale-to-gray and favor-black features).

Annotation. LEADTOOLS supports annotation of images by letting you overlay images with text, lines, shapes, arrows, buttons, highlights, hot spots, sticky notes, stamps, buttons, and sounds.

Fast rotation. LEADTOOLS achieves fast rotation in 90-degree increments by applying a rotated view perspective to the bitmap.

ISIS support. LEADTOOLS supports ISIS interfaces for driving scanning devices.

Faster compression and decompression. The Document/Medical editions work faster when loading and saving LEAD CMP, JPEG, and CCITT Group 3 and Group 4 images. The LEADTOOLS functions for loading and saving are the same in all products. The only difference is in performance.

1-bit Image Clean-up. The Document toolkits include support for removing dots, blobs, holes, inverted text, lines, borders, bumps and nicks from 1-bit images.

Region Clean-up. [Document/Medical] Remove all the holes from a region.

Embedded Messages. The Document toolkits include support for embedding messages in lossless image formats like bmp, tiff, lossless jpeg, etc. The message is embedded without any visible changes to the image, and does not appreciably increase the size of the image. The message is password-protected.

Image Conversion. The Document toolkits include support for transforming a bitmap into a binary image using specified thresholds or a threshold calculated automatically based on statistical features of the bitmap.

12 and 16 bit grayscale images. [Document/Medical] Load, process, display, window level and save 12 and 16 bit grayscale images (including support for 16-bit grayscale TIFF).

48 and 64 bit color images. [Document/Medical] Load, process, display, and save 48 and 64 bit color images.

MRC Support. [Document/Medical] LEADTOOLS supports the Mixed Raster Content format for color documents containing mixed image and text components. For more information, refer to the

Halftoning. [Document/Medical] Convert 1-, 4-, 8-, 16-, 24-, or 32-bit bitmaps to a halftoned bitmap, with a specified pattern rotation. A halftoned bitmap is a 1-bit bitmap that has been dithered for black and white printing or display.

LEADTOOLS Document Imaging Suite

The LEADTOOLS Document Imaging Suite toolkit contains all the capabilities of LEADTOOLS Document Imaging, and includes the features listed below. Please note that the OCR features are included in this toolkit, however they can also be purchased as a plug-in for the LEADTOOLS Document Imaging toolkit. Also, JBIG support is provided in this toolkit, however a JBIG Module may be added on to LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging or LEADTOOLS Medical Imaging Suite.

OCR features. [Document/Medical] LEAD offers OCR features that use Scansoft Textbridge technology. Support for these features is included in the LEADTOOLS Document Imaging Suite, and can be added, via plug-in to the LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite toolkits. The OCR features allow you to perform optical character recognition and turn images into documents. Features include preset confidence and accuracy levels for controlling how sensitive the engine is to unrecognized text, artificial intelligence for improving recognition on documents of the same type, and built-in and user-defined lexicons for limiting the type of text to recognize within a particular zone. LEADTOOLS provides the ability to verify or correct text during, and (using LEAD's unique OCR editor) after recognition. LEAD's OCR editor ties the text being edited directly to the image, providing a visual reference to the original bitmap data. The OCR engine can perform Automatic area segmentation creating multi-layered zones, recognizing areas such as tables, rules, images and text. Or, you can manually designate up to 250 such zones. The OCR features support different fonts, sizes (5 to 72 point) and styles. Fax, dot matrix and halftones can be preprocessed to improve recognition results. The OCR Engine supports major European and Scandinavian languages (Danish, Dutch, Finnish, French, German, Italian, Norwegian, Portuguese, Russian, Spanish, and Swedish) as well as English. Support for dialects such as US. English, French Canadian, Latin American Spanish, Swiss German, and Brazilian Portuguese is also provided.

Recognized text can be exported to more than 40 different formats, including MS Word, MS Excel, Dbase andWordPerfect. The LEADTOOLS OCR features contain superior OCR processing speeds, for use in form recognition and processing applications.

LEAD's JBIG filter. [Document/Medical] LEAD includes support for this filter in the LEADTOOLS Document Imaging Suite toolkit. Support for this filter can be added to LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging or LEADTOOLS Medical Imaging Suite by purchasing the JBIG Module. JBIG defines a method for lossless compression encoding of a bi-level image (two-color image). This method can also be used for coding grayscale and color images. LEADTOOLS completely supports all three types of images, giving you the ability to make full use of this powerful compression technology. LEADTOOLS also supports the progressive capability of JBIG, allowing you to store and send multiple representations of images at different resolutions without any extra storage overhead.

LEADTOOLS Medical Imaging

LEADTOOLS Medical Imaging contains all the capabilities of LEADTOOLS Document Imaging. It also includes general medical imaging technologies (1-16,24,32 bit color, 1-16 bit grayscale and window leveling of 12 and 16-bit grayscale images) and support for the DICOM file format.

DICOM file support. [Medical] LEADTOOLS Medical Imaging provides COMPLETE support for the DICOM 3.0 specification, including all standard IOD classes and modalities (CR, CT, MR, NM, US, RF, SC, VL, etc.) and complete DICOM Basic Directory support.

Window leveling. [Document/Medical] Detect and set LowBit and HighBit for image data, display images with automatic LUT intensity expansion, or set LUT entries and ranges with specific values and gradients. Display images through the LUT without changing the data, or process the image data using the LUT. Linearize the number of pixels locally in a bitmap, based on the specified color space in order to bring out the detail in dark areas of an image, and smooth the edges between blocks.

Medical Imaging Processing. [Medical] LEADTOOLS Medical Imaging provides image processing functionality designed specifically to allow you to examine and improve the quality of medical images.

LEADTOOLS Medical Imaging Suite

LEADTOOLS Medical Imaging Suite contains all the capabilities of LEADTOOLS Medical Imaging. In addition, it supports the following:

DICOM Communication support. [Medical Suite] LEADTOOLS provides COMPLETE support for DICOM Communications, including all Service Classes (Verification, Storage, Query/Retrieve, Patient Management, etc), and contains high-level communications functions simplifying the creation of DICOM client/server applications.

(Document/Medical) is used in the documentation to designate the features that are available in LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite. Those features that are available only in the Medical toolkits are indicated in the documentation by (Medical). Features available only in the LEADTOOLS Medical Imaging Suite toolkit are indicated in the documentation by (Medical Suite).

(Internet only) is used in the documentation to designate the features that are available only in the LEADTOOLS Internet toolkit.

For more information, refer to Document/Medical Edition Support and Licensing Requirements .


LEADTOOLS Reference Manuals

LEADTOOLS provides reference manuals that contain the same information as the online help. You can print them from PDF files. Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.

To print the PDF files, you must use the Adobe Acrobat Reader 3.0 or higher. You can download a copy of the Acrobat Reader from the Adobe web site (http://www.adobe.com). Note that different versions of the Acrobat Reader are available for different operating systems, but they all can read the same PDF files.


Topic Selection

LEAD Technologies, Inc.
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

Sales@Leadtools.com
www.leadtools.com

(704) 332-5532
FAX: (704) 372-8161
Tech Support: (704) 372-9681

LEADTOOLS is ideal for developers involved in still frame, multimedia, document, medical, and vector imaging projects, including Internet/Intranet applications. Independent of the specific application requirement – scanning, file format support/conversion, compression, image processing, annotation, database support, multimedia, etc. – LEADTOOLS provides the most comprehensive, robust, flexible, and powerful imaging solution available.

Click this button to start the Licensing help file to review the License Agreements governing your use of the software.

Click this button to start the Products help file to review the full line of LEADTOOLS Products.

Click this button to start the Imaging help file to review the full line of LEADTOOLS Image Categories.


Document/Medical Support and Licensing Requirements

Document/Medical Licensing and Royalty Agreements:

Congratulations! You have licensed one of the LEADTOOLS Document/Medical software products, the most comprehensive imaging toolkits on the market, enabling you to create powerful imaging applications. The license terms for LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite require runtime licensing based on the number of copies of your application that you deploy (i.e., distribute or install and use internally).

By paying the initial box price for the applicable LEADTOOLS product, you have obtained a development license, which entitles you to develop your application and test it. Once completed, if you wish to distribute the application or deploy it internally on multiple machines, you are required to enter into a duplication and distribution agreement with LEAD. You have the ability to choose from several licensing options depending on your volume needs.

The product you are installing is a fully functional working version and includes support for all features in LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite. (Depending on which product you have licensed, some of the features may ultimately not be available to you. See the on-line help file for a product feature comparison.) Until you sign and return the correct licensing agreement, your application will display a "nag" message. Once LEAD receives the executed contract, we will provide you a password that will permit you to terminate the "nag" message for the product that you have licensed. In addition to providing the password, you must also use the no nag version of the LTKRN13N.DLL, found in the REDIST\NONAGLTKRN directory. This is also the version you must redistribute.

Duplication and Distribution Agreements

Click this button to start a new WinHelp session to review the License Agreements governing your use of the software.