TOOLBARCALLBACK function

#include "LtTLB.h"

L_INT EXT_CALLBACK YourFunction(pToolbar, nButtonID, dwData, pUserData )

pTOOLBARHANDLE pToolbar;

/* pointer to a toolbar handle */

L_UINT nButtonID;

/* button ID */

L_UINT32 dwData;

/* reserved */

L_VOID L_FAR * pUserData;

/* pointer to additional data */

Handles each action that occurs in the toolbar.

Parameter

Description

pToolbar

Pointer to a toolbar handle.

nButtonID

An integer that identifies the button that was responsible for creating the toolbar event.

dwData

Reserved for future use.

pUserData

A void pointer that you can use it to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of the calling function.)

 

Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function.

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 the callback function must be set using L_TBSetCallback. To determine that current callback function that is handling toolbar events, call L_TBGetCallback.

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:

L_TBSetCallback, L_TBGetCallback

Topics:

Receiving Toolbar Events

Example:

For an example, refer to L_TBSetCallback.