<?xml encoding=”UTF-8″>By Balaji Ramamoorthy
ObjectARX 2004 SDK had this nice C++ sample on adding tray items to the status bar and displaying balloon notification in one of those tray items. I have migrated this sample project to work on AutoCAD 2015 and you can download it here :
To build this sample, place it under sampleseditor folder in ObjectARX 2015 SDK path. Here is a sample code snippet to display balloon window from that sample :
<span>// Create the bubble notification message, and callbacks.</span><span> </span>
<span>int</span><span> result;</span>
AcApDocument *pDoc=acDocManager->curDocument();
CString strMsg(_T(<span>" Notification"</span><span> ));</span>
AcTrayItemBubbleWindowControl bwControl(
<span>"Attention!"</span><span> , </span>
strMsg,
<span>"HyperText Here"</span><span> , </span>
<span>"www.autodesk.com"</span><span> );</span>
bwControl.SetIconType(
AcTrayItemBubbleWindowControl::
BUBBLE_WINDOW_ICON_INFORMATION);
bwControl.SetCallback(BubbleWindowCallback, pDoc);
result=trayItems[0]->ShowBubbleWindow(&bwControl);
To control the time the balloon will be displayed, please run the “TRAYSETTINGS” command and set the display time.

Leave a Reply