Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

ToolTips with more than one text line

I want add tooltip with more than one line. Any suggestion?
Thanx in advance.
0
mguedes
Asked:
mguedes
  • 2
1 Solution
 
mguedesAuthor Commented:
Edited text of question
0
 
mbhaktaCommented:
In your resource, add another \n and see what happens. For instance :
&File\nOpen\nFile

So the tooltip should show Open and File in two lines.
0
 
mguedesAuthor Commented:
The tooltips that i talk are tooltips created with CToolTipCtrl
in my CView derived class and i tested your suggestion with negative response. thanx anyhere!!
0
 
RONSLOWCommented:
You can set the maximum width of a tooltip etc.

First you need (a pointer to) your tooltip object.  I you create your own, you already one.  If you use EnableToolTips then you can get a pointer to it with:

CToolTipCtrl* pToolTip = AfxGetThreadState()->m_pToolTip;

Then you can adjust width, popup delay and time etc like this

pToolTip->SendMessage(TTM_SETMAXTIPWIDTH, 0, 160);
pToolTip->SendMessage(TTM_SETDELAYTIME, TTDT_AUTOPOP, 2000);
pToolTip->SendMessage(TTM_SETDELAYTIME, TTDT_INITIAL, 200);
pToolTip->SendMessage(TTM_SETDELAYTIME, TTDT_RESHOW, 200);

0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now