SVC ADD CHATBARITEM

From LIVECHAT Developer Zone Wiki

Jump to: navigation, search
SVC_ADD_CHATBARITEM
Add new item to the toolbar in chat window.


Parameters
wParam
NULL
lParam
LCTOOLBARITEM* toolbar


Return values

  • API_SUCCESS – item added successfully
  • API_ERROR – operation failed


Remarks
If item already exists it is updated.

You can add item to a main toolbar or message pane shortbar of the chat window. To do that you must set toolbar_id to one of the following values:

#define IDR_CHATFRAME		244
#define IDR_CHATFRAME_SHORTBAR	240


Sample code

        LCTOOLBARITEM item = {0};
	item.cbSize = sizeof(LCTOOLBARITEM);
	item.id = 1000;
	item.toolbar_id = IDR_CHATFRAME;
	item.plugin_name = name();
	item.caption = _T("Test button");
	item.tooltip = _T("Sample tooltip");
	item.service = _T("OnButtonClick");
	item.position = 0;
	item.icon = LoadIcon(mInstance , MAKEINTRESOURCE(IDI_ICON1));

	call(SVC_ADD_CHATBARITEM, 0, (LPARAM) &item);
Personal tools