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