Solved

ToolTips with more than one text line

Posted on 1997-10-03
4
240 Views
Last Modified: 2013-11-19
I want add tooltip with more than one line. Any suggestion?
Thanx in advance.
0
Comment
Question by:mguedes
  • 2
4 Comments
 

Author Comment

by:mguedes
ID: 1307444
Edited text of question
0
 
LVL 4

Expert Comment

by:mbhakta
ID: 1307445
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
 

Author Comment

by:mguedes
ID: 1307446
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
 
LVL 10

Accepted Solution

by:
RONSLOW earned 10 total points
ID: 1307447
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question