ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Ampersand in tooltips
Posted by mgampi on Mar-22-2011 16:34
Hi;

How can I display ampersands in tooltips generated by imagemaps using C++?

  Re: Ampersand in tooltips
Posted by mgampi on Mar-22-2011 16:51
Hi;

I use this code to generate the tooltip:

...
boost::scoped_array<LPSTR> names(new LPSTR[data_.size()]);
std::string temp = TCHARtoUTF8(_T("<Beginn & Ende?>"));
names[index] = strdup(temp.c_str());
...
c1->addExtraField(StringArray(names.get(), data_.size()));
...
setImageMap(c1->getHTMLImageMap("","","title='{field0}'"));

  Re: Ampersand in tooltips
Posted by Peter Kwan on Mar-23-2011 00:53
Hi mgampi,

If you are using the MFC CChartViewer in ChartDirector for C++, currently, the tooltips are created using a standard MFC CToolTipCtrl in its default configuration, which will remove the ampersand character.

According to MFC documentation, you may configure the window style to TTS_NOPREFIX to avoid the ampersand character from being removed. It should be something like:

myChartViewer.getToolTipCtrl()->ModifyStyle(0, TTS_NOPREFIX);

Hope this can help.

Regards
Peter Kwan

  Re: Ampersand in tooltips
Posted by mgampi on Mar-24-2011 06:12
Thanks, that did it!

Martin