steva
asked on
Tool Tips for CStatic controls
Tool tips don't seem to work for CStatic controls. Am I missing something?
Thanks
Steve
Thanks
Steve
ASKER
I don't think the problem is ID = -1. I've assigned unique IDCs to all my Static text boxes and viewing Resource Symbols shows positive unique values for all of them.
Using an Edit box in read-only mode is a good idea, but it's still not quite like a Static text box, in that you can't shrink the heigth as much as you can a static box. I have a dialog box with about 75 of these boxes and the minimum height of the edit box spreads them out a bit more than I'd like.
This is a dialog box and the tooltips work fine for other non-static controls. To get theseto work I created a CToolTipCtrl, created a PreTranslateMessage routine to pass mouse messages to it and set up the ToolTip command with:
pToolTip->AddTool(&m_Acces sTpVal, "Throughput into bufs");
pToolTip->AddTool&m_bufCou nt, "Number of bufs");
etc.
etc.
As long as the variables m_AccessTpVal, etc., are for CEdits this works fine.
Steve
Using an Edit box in read-only mode is a good idea, but it's still not quite like a Static text box, in that you can't shrink the heigth as much as you can a static box. I have a dialog box with about 75 of these boxes and the minimum height of the edit box spreads them out a bit more than I'd like.
This is a dialog box and the tooltips work fine for other non-static controls. To get theseto work I created a CToolTipCtrl, created a PreTranslateMessage routine to pass mouse messages to it and set up the ToolTip command with:
pToolTip->AddTool(&m_Acces
pToolTip->AddTool&m_bufCou
etc.
etc.
As long as the variables m_AccessTpVal, etc., are for CEdits this works fine.
Steve
I think you Need to have the SS_NOTIFY flag ON for your static window..
Refer this link and see article. Maybe this will help you.
http://www.codeguru.com/Cpp/controls/combobox/tooltips/article.php/c9283/
You will most likely have to modify a code to meet your needs.
-MAHESH
Refer this link and see article. Maybe this will help you.
http://www.codeguru.com/Cpp/controls/combobox/tooltips/article.php/c9283/
You will most likely have to modify a code to meet your needs.
-MAHESH
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes! Just clicking Notify for the static control in Properties\Style let's the tool tip work. Thanks.
You can create an EditBox control in read-only mode and it will look just like a Static control.
If those points don't help, then please provide some more information about your program... if this is in a dialog box, then what have you done so far to get the tooltips to work (they don't normally work in dialog boxes).