Someone kindly posted something similar to this in 2002...
Private void provideDescription
(
DisplayPathP path, // => display path
MSWChar* description, // <=> description
MSWChar* refStr // => Ref string
)
{
ElementRef elemRef = mdlDisplayPath_getCursorElem (path);
if (LINE_ELM == elementRef_getElemType (elemRef))
mdlWideChar_strcat (description, L" - This is a Line element");
else
mdlWideChar_strcat (description, L" MDL is FUN!");
}