#include "ltwrappr.h"
virtual L_INT LToolbar::ToolbarCallBack (nButtonID, dwData)
User-overrideable [LToolbar:ToolbarCallBack function to process certain events.
The button that was responsible for creating this toolbar event.
User-defined data that will retrieved with the toolbar information.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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
class LUserToolbar:public LToolbar
{
protected :
virtual L_INT ToolBarCallBack(L_UINT nButton, L_UINT32 dwData);
};
L_INT LUserToolbar::ToolBarCallBack(L_UINT nButton, L_UINT32 dwData)
{
UNREFERENCED_PARAMETER(nButton);
UNREFERENCED_PARAMETER(dwData);
//do your work;
return 0;
}
// the user should call LToolbar::EnableToolBarCallBack()
L_INT LToolbar__ToolBarCallBackExample()
{
LUserToolbar userToolbar;
userToolbar.EnableToolbarCallBack (TRUE);
return SUCCESS;
}