Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Customizing CFrameWnd-Tooltip text at runtime

93 views
Skip to first unread message

Ole Hoppe

unread,
Oct 29, 1997, 3:00:00 AM10/29/97
to

Hi,

cannot find out how to customize the tooltip text displayed for buttons on
a standard MFC CToolBar at runtime. Any help greatly appreciated!

Sincerely

Ole

Madhav

unread,
Oct 29, 1997, 3:00:00 AM10/29/97
to

Hi,

In the OnNotify of the frame you could check for the TTN_NEEDTEXT
notification and attach the below code.

LPTOOLTIPTEXT lptt;
switch(((LPNMHDR)lParam)->code)
{
case TTN_NEEDTEXT:
lptt=(LPTOOLTIPTEXT)lParam;
lptt->lpszText="The Text You want To Display As ToolTip";
break;
}

Hope this helps.
Regards,
Madhav.

Aditi Technologies Pvt. Ltd.
224/16 Ramana Maharishi Road,
Bangalore 560080.

Tel :(91 80) 3312966/67
Fax :(91 80) 3346201
http://www.aditi.com
email :mad...@aditi.com

Ole Hoppe

unread,
Oct 29, 1997, 3:00:00 AM10/29/97
to

Hi, Madhav,

thanks a lot for your hint - but it doesn't help, had tried this already.
TTN_NEEDTEXT won't come in, is there a special flag to be set for
CMainFrame to be notified?

Madhav <mad...@aditi.com> wrote in article
<34571809...@aditi.com>...

Jean-Edouard Lachand-Robert

unread,
Oct 29, 1997, 3:00:00 AM10/29/97
to

Hi Ole,

First, you must handle BOTH the TTN_NEEDTEXTA AND the TTN_NEEDTEXTW
notifications in your handler.

Second, if your application is a MDI one, you must place your ON_NOTIFY
macros into your CChildFrame class, not in your CMainFrame.

Jean-Edouard.


Ole Hoppe wrote in message <01bce46f$68503140$0d204080@uni01>...

0 new messages