SVC ADD PANEL

From LIVECHAT Developer Zone Wiki

Jump to: navigation, search
SVC_ADD_PANEL
Add new panel in the main application window.


Parameters
wParam
NULL
lParam
LCPANEL* panel


Return values

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


Sample code

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

	LCPANEL panel = {0};
	panel.cbSize = sizeof(LCPANEL);
	panel.plugin_name = name();
	panel.id = 1000;
	panel.caption = _T("Sample caption");
	panel.direction = PanelDockRight;
	panel.dialog = pDialog;
	CRect rect(0, 0, 215, 500);
	panel.rect = rect;
	
	call(SVC_ADD_PANEL,0,(LPARAM)&panel);
Personal tools