Before getting in to the code, just want to inform you that with Acad 2015 support for showing text labels on the buttons in the status bar is not available.
Earlier we can switch between text labels and icons of status bar panes, now only icons.
I got an opportunity to migrate a very old sample on status bar which was shipped with ObjectARX SDK 2007 to current AutoCAD 2014/15.
void testPane()
{
int result;
AcApDocument *pDoc=acDocManager->curDocument();
AcApStatusBar* pStatus = acedGetApplicationStatusBar();
if (pStatus)
{
/*Get pane count*/
int iCnt = pStatus->GetPaneCount();
/*Get default pane to position our custom pane */
AcPane* pdfltPane =
pStatus->GetDefaultPane(ACSBPANE_APP_ORTHO);
int index =
pStatus->GetIndex(pdfltPane);
int iStyle=
pdfltPane->GetStyle();
CPaneItem* pPaneItem = new CPaneItem();
result=
pPaneItem->SetToolTipText(
_T("Pane Icon Item Tooltip"));
pPaneItem->Enable(TRUE);
result=pPaneItem->SetStyle(iStyle);
pPaneItem->SetVisible(TRUE);
HICON hIcon =
(HICON)::LoadImage(_hdllInstance,
MAKEINTRESOURCE(IDI_WORLD),
IMAGE_ICON, 16, 16, 0);
result=pPaneItem->SetIcon(hIcon);
result = pStatus->Insert(index+1, pPaneItem);
}
pStatus->Update();
SDK migrated sample