SVC ADD BARPANE

From LIVECHAT Developer Zone Wiki

Jump to: navigation, search
SVC_ADD_BARPANE (deprecated)
Add new bar pane and a shortcut bar item in the compact mode window.


Comment

Deprecated since ver. 5.2.2.0. Compact mode window no longer contains barpanes.


Parameters
wParam
NULL
lParam
LCBARPANE* pane


Return values

  • API_SUCCESS – pane added successfully
  • API_ERROR – operation failed or pane with specified id exists


Sample code

        CDialog* pDialog = new CSampleDialog(); // custom window with WS_CHILD style
        if (!pDialog)
            return;
        
	HINSTANCE instance = AfxGetResourceHandle(); 
	AfxSetResourceHandle(mInstance);        // switch to plugin's resources
	if (pDialog)
		pDialog->Create(CSampleDialog::IDD);
	AfxSetResourceHandle(instance);

	HBITMAP hBitmap = ::LoadBitmap(mInstance, MAKEINTRESOURCE(IDB_BITMAP) );
	CImageList list;
	list.Create(16, 16, ILC_COLOR24 | ILC_MASK, 0, 0);
	list.Add(CBitmap::FromHandle( hBitmap ), RGB(255, 0, 255));

        LCBARPANE pane = {0};
	pane.cbSize = sizeof(LCBARPANE);
	pane.id = 1000;
	pane.caption = _T("Sample caption");
	pane.menu = 0;
	pane.image_list = list.Detach();
	pane.plugin_name = name();
	pane.service = _T("OnRightClick");
	pane.dialog = pDialog;
	
	call(SVC_ADD_BARPANE, 0, (LPARAM)&pane);
Personal tools