Tooltips for dialog controls
Posted
by Dave Bixler
on August 7th, 1998
Add a member to the CDialog or CWnd derived class in the header like:
CToolTipCtrl CTTDialog :: m_ToolTip;In the OnInitDialog or OnInitialUpdate, add:
m_ToolTip.Create (this);
m_ToolTip.Activate (TRUE);
CWnd* pWnd = GetWindow (GW_CHILD);
while (pWnd)
{
int nID = pWnd->GetDlgCtrlID ();
if (nID != -1)
{
m_ToolTip.AddTool (pWnd, pWnd->GetDlgCtrlID ());
}
pWnd = pWnd->GetWindow (GW_HWNDNEXT);
}
To add a tooltip to a control, just add a string resource using the same ID as the control to get
the tip. If I wanted the OK button to have a tip, I would add a string resource for IDOK.Also do not forget to put the following code to you dialog class:
BOOL CTTDialog :: PreTranslateMessage(MSG* pMsg)
{
if (m_hWnd)
{
m_ToolTip.RelayEvent (pMsg);
return CDialog::PreTranslateMessage(pMsg);
}
return (FALSE);
}
That's it.
Last updated: 18 May 1998

Comments
You want some tomato basil and mozzarella. In esteem of indoor say, these slippers are as light and manueverable as sneakers.
Posted by Soaceddew on 04/24/2013 08:57amHas only released some chic color Democratic Inneva Woven shoes, Nike recently with another way to regurgitate shoes with distinguishable styling to all [url=http://northernroofing.co.uk/roofins.cfm]nike free run[/url] eyes. This brings steadfast issue Free Inneva Woven is a White Label of works in the series, represents shoes Italian made the assurance. Latest Liberated Inneva Woven jet and pornographic are available in two color schemes, to hand-knit Woven vamp in summing-up to infiltrated Italy's [url=http://fossilsdirect.co.uk/glossarey.cfm]nike huarache free[/url] finest crafts, during the interval gives athletes close to the foot of relieve, the most important opportunity is the goal of Loose 5 configuration, barefoot be aware it resolution allure cannot be ignored. Nike Disburden Inneva Woven SP White Label Wedge on Parade 16 at outlets for everyone the [url=http://northernroofing.co.uk/roofins.cfm]nike free uk[/url] trade name on the shelves, and on sale in narrow sort, interested friends should recompense close publicity to Nike announced the news.
ReplyNikeFree again four shoes eager in autumn and winter wear assuage is perfect ok champion
Posted by Speadyday on 04/19/2013 08:33amNike Unengaged TR Becoming 2 Safeguard upper of textile materials in line with seasonal requirements, enhances the warmth and durability, and cogitative material, in [url=http://www.nikeskorrea.se/nike-air-max-1-c-41/]air max 1[/url] poor visibility when elucidation and DWR (fast water unruly) coating to achieve breathability while, contract out feet barren in dripping weather. Shoe northern welt on the preferential of the bow down foam enhances foot support and stability. Quality ratio of the Nike Free shoe Groove lay out provides stretchable like literal feet be aware and stability of multi-direction workings while [url=http://www.nikeskoroutlet.se/nike-free-run-2-c-61/]nike free run 2 dam[/url] retaining tenure and shockproof column inherent in training shoes. Lightweight Phylite midsole can unseat and plenty of durability, which increments the utility exponentially outsole, which significantly reduces the manipulate of the shoe. Tail and foot rubber grooves made of environmentally clubby materials, stop to lift its [url=http://www.nikeskoroutlet.se/nike-free-30-v4-c-85/]nike free 3.0 sverige[/url] multi-directional feel on all kinds of route surfaces.
ReplyComboBoxEx
Posted by Legacy on 11/02/2003 12:00amOriginally posted by: Walter Hahn
This method works perfect but not with the ComboBoxEx control. Any idea how to get it work with this control?
ReplyCant get this to work in Visual C++.NET (7.0)
Posted by Legacy on 10/28/2003 12:00amOriginally posted by: Mike Pliam
ReplyHow to get "&" in ToolTips.
Posted by Legacy on 11/27/2002 12:00amOriginally posted by: Rajkumar
All are fine..But how to get ampersand in tooltips.
ReplyTooltip useful
Posted by Legacy on 04/09/2002 12:00amOriginally posted by: Anand Kumar
best is yet to be seen
thanks
ReplyThanks a lot! I like it!
Posted by Legacy on 01/30/2002 12:00amOriginally posted by: GZM
Replytooltips in CstatusBarCtrl ???
Posted by Legacy on 06/02/2001 12:00amOriginally posted by: amit gupta
How can i use the tooltips when i use a CStatusBarCtrl status bar .how should i trap the event when the mouse hovers over a button or a menu item.Problem is that i am unable to use CStatusBar with dialogs.Hence i am using CStatusBarCtrl .
Can anybody suggest how to use a status bar in a dialog
ReplyPlease.I am ready to try anything.
Waiting...
Thanks Dave
Posted by Legacy on 01/30/2001 12:00amOriginally posted by: Rajiv
Thanks Dave,
ReplyThis helped me in my project!
ToolTips
Posted by Legacy on 03/03/1999 12:00amOriginally posted by: sahu
It seems to work pretty well, but the tooltip does not show up when a
Replycontrol is disabled. Any ideas???
Loading, Please Wait ...